在Windows下,性能计数器具有不同的名称,具体取决于操作系统语言.例如,在英文版Windows上,有性能计数器\Processor(_Total)\% Processor Time.\Prozessor(_Total)\Prozessorzeit (%)在德语Windows版本上调用相同的计数器.
\Processor(_Total)\% Processor Time
\Prozessor(_Total)\Prozessorzeit (%)
有没有办法以与语言无关的方式检索性能计数器值(使用C++或C#)?或者有没有替代方案来获得整个计算机的处理器负载而没有性能计数器?
c# c++ windows performancecounter
c# ×1
c++ ×1
performancecounter ×1
windows ×1