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

查看:30
本文介绍了.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 Performance Counters,可以在 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/packages/System.Diagnostics.性能计数器/

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

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