Kat*_*uiz 5 c# asp.net instrumentation performancecounter
我有一个非常简单的问题,我认为以前已经回答过,但是我只是找不到与我要寻找的内容完全相同且简单的参考。
我有一个控制台实用程序应用程序,该应用程序根据每个输入参数获取每个Web应用程序或Windows服务的性能计数器列表。
我的简单问题是:应该使用NextValue读取哪些计数器,使用RawValue读取哪些计数器?
由于我的实用程序需要快速运行(不到2秒),因此我想高效地读取每个计数器。例如,我知道必须通过NextValue读取Process /%Processor Time,而可以通过RawValue读取Process / Working Set。
我试图让我的应用程序根据PerfCounterType(NumberItems32,CounterXXX等)来决定,该方法可以正常工作,但是我只需要有关如何读取它们的确切简单直接信息。
我的早期结论似乎是必须通过NextValue读取所有内容,以提高准确性,但是由于经验是某些人可以执行RawValue,因此最好通过第二次读取并避免需要1秒钟的睡眠。
这是潜在的计数器列表,我获得了Type:
# Bytes in all Heaps = NumberOfItems32
# Gen 0 Collections = NumberOfItems32
# Gen 1 Collections = NumberOfItems32
# Gen 2 Collections = NumberOfItems32
# Induced GC = NumberOfItems32
# of current logical Threads = NumberOfItems32
# of current physical Threads = NumberOfItems32
# of Exceps Thrown / sec = RateOfCountsPerSecond32
# of Exceps Thrown = NumberOfItems32
# of marshalling = NumberOfItems32
# of Sink Blocks in use = NumberOfItems32
% Processor Time = Timer100Ns
% Time in GC = RawFraction
Bytes Received = NumberOfItems64
Bytes Sent = NumberOfItems64
Cache % Process Memory Limit Used = RawFraction
Cache % Process Memory Limit Used = RawFraction
Cache Total Entries = NumberOfItems32
Cache Total Entries = NumberOfItems32
Cache Total Entries = NumberOfItems32
Channels = NumberOfItems32
Connections Established = NumberOfItems32
Context Proxies = NumberOfItems32
Current Queue Length = NumberOfItems32
Errors Unhandled During Execution = NumberOfItems32
Errors Unhandled During Execution = NumberOfItems32
Errors Unhandled During Execution = NumberOfItems32
Finalization Survivors = NumberOfItems32
Forms Authentication Failure = NumberOfItems32
Forms Authentication Failure = NumberOfItems32
Forms Authentication Success = NumberOfItems32
Forms Authentication Success = NumberOfItems32
Gen 0 heap size = NumberOfItems32
Gen 1 heap size = NumberOfItems32
Gen 2 heap size = NumberOfItems32
Handle Count = NumberOfItems32
Large Object Heap size = NumberOfItems32
Remote Calls/sec = RateOfCountsPerSecond32
Request Wait Time = NumberOfItems32
Request Wait Time = NumberOfItems32
Requests Executing = NumberOfItems32
Requests Executing = NumberOfItems32
Requests Executing = NumberOfItems32
Requests In Application Queue = NumberOfItems32
Requests In Application Queue = NumberOfItems32
Requests In Application Queue = NumberOfItems32
Requests Succeeded = NumberOfItems32
Requests Succeeded = NumberOfItems32
Requests Succeeded = NumberOfItems32
Requests Timed Out = NumberOfItems32
Requests Timed Out = NumberOfItems32
Requests Timed Out = NumberOfItems32
Requests/Sec = RateOfCountsPerSecond32
Requests/Sec = RateOfCountsPerSecond32
Requests/Sec = RateOfCountsPerSecond32
Sessions Active = NumberOfItems32
Sessions Active = NumberOfItems32
Sessions Active = NumberOfItems32
Thread Count = NumberOfItems32
Total Remote Calls = NumberOfItems32
Working Set - Private = NumberOfItems64
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
852 次 |
| 最近记录: |