Castle學習系列(十一)---Windsor性能檢測

       Windsor提供了容器性能檢測的功能,只需在程序啓動的時候後添加一下代碼
var diagnostic = LifecycledComponentsReleasePolicy.GetTrackedComponentsDiagnostic(_container.Kernel);
var counter = LifecycledComponentsReleasePolicy.GetTrackedComponentsPerformanceCounter(new PerformanceMetricsFactory());
_container.Kernel.ReleasePolicy = new LifecycledComponentsReleasePolicy(diagnostic, counter);

其中_container是你的IOC容器。


     然後右鍵點擊計算機->管理出現如下界面



點擊+來添加Castle Windsor的性能監控。

發佈了62 篇原創文章 · 獲贊 10 · 訪問量 17萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章