.NET Core性能计数器的故事是什么? [英] What is the story of Performance Counters for .NET Core?

查看:159
本文介绍了.NET Core性能计数器的故事是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows下,可以使用以下内容读取.NET性能计数器:

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


  • 性能监视器

  • C#使用 PerformanceCounter

  • WMI并查询与.NET相关的类

考虑到.NET Core的最新版本以及该应用程序也可以在Linux中运行的事实,如何才能访问Windows上当前可用的.NET相关统计信息?

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?

推荐答案

此程序包与.NET Framework性能计数器完全等效,可以在Windows下的.NET Core应用程序中使用:

This package is exactly equivalent of .NET Framework Performance Counters and can be used in .NET Core apps under Windows:

https://www.nuget.org/包/System.Diagnostics.PerformanceCounter/

这篇关于.NET Core性能计数器的故事是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆