What is the story of Performance Counters for .NET

2019-03-23 08:17发布

Under Windows, one is able to read .NET performance counters using the following:

  • Performance Monitor
  • C# using PerformanceCounter
  • WMI and querying the .NET related classes

Considering the recent release of .NET Core and the fact that such app can also run in Linux, how can one access the .NET related stats currently available on Windows?

2条回答
对你真心纯属浪费
2楼-- · 2019-03-23 08:21

In the Windows Compatibility Pack for .NET Core will be support for Performance Counters

https://www.nuget.org/packages/Microsoft.Windows.Compatibility

https://blogs.msdn.microsoft.com/dotnet/2017/11/16/announcing-the-windows-compatibility-pack-for-net-core/

Of course, it is a Windows only feature for now.

查看更多
Evening l夕情丶
3楼-- · 2019-03-23 08:24

Performance counters are not in Linux thus not in NET Core. Create another "Full NET based helper application" to expose performance counters as service to "NET Core Application"

查看更多
登录 后发表回答