Creating a PerfMon counter to record an average per call (C#)

后端 未结 2 1854
野趣味
野趣味 2020-12-07 09:58

How can I use PerfMon counters to record the average execution time of a method in C#?

So far I\'ve only found sample code to incrememnt or decrement a PerfMon count

2条回答
  •  我在风中等你
    2020-12-07 11:04

    Take a look at the different PerformanceCounterTypes. There are several types for calculating average time or count. You will also find some examples.

    Hope this helps.

提交回复
热议问题