【发布时间】:2018-07-06 11:51:46
【问题描述】:
我尝试通过
读取内存性能计数器'% Time in GC' Process p = Process.GetCurrentProcess();
PerformanceCounter gcTimeCounter = new PerformanceCounter("Memory", "% Time in GC");
但这会引发 InvalidOperation 类型的异常。如何读取这个参数?
【问题讨论】:
-
它好像错了?哪方面看起来不对?
-
引发 InvalidOperation 异常
-
分类错误,使用“.net clr memory”
-
@AlexK.thanks。您可以将其转换为答案吗?
标签: c# .net memory-management