【问题标题】:Windsor Performance Counter miss in PerfMonPerfMon 中的 Windsor Performance Counter 未命中
【发布时间】:2018-05-05 02:48:32
【问题描述】:

我想在我的性能监视器中添加 Windsor 的性能计数器... 我已经按照docs 中的说明配置了 Windsor:

var diagnostic = LifecycledComponentsReleasePolicy.GetTrackedComponentsDiagnostic(container.Kernel);
var counter = LifecycledComponentsReleasePolicy.GetTrackedComponentsPerformanceCounter(new PerformanceMetricsFactory());
container.Kernel.ReleasePolicy = new LifecycledComponentsReleasePolicy(diagnostic, counter);

然后我运行我的 Web Api 应用程序,并运行性能监视器。但是当我尝试添加一个新计数器时,我没有找到“温莎城堡”部分。

我在做什么有什么问题?

PS.:我使用的是 Windsor 4

【问题讨论】:

    标签: castle-windsor performancecounter performance-monitor


    【解决方案1】:

    Windsor 可能没有创建性能计数器类别和计数器的权限(即写入注册表),并且正在吞噬PerformanceMetricsFactory.Initialize 中的SecurityException。

    以管理员身份运行您的应用程序或 Visual Studio,您只需执行一次。

    【讨论】:

      猜你喜欢
      • 2012-11-05
      • 2020-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多