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万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章