0
votes

I have an application that is executing a number of operations. I have some performance counters that measure the average time it takes to execute the operation between intervals. I would like a counter that for each interval will display the maximum time that it took to handle one of the operations since the last interval.

For an average I use a PerformanceCounter of type AverageTimer32 instance and an AverageBase instance. What kind of performance counter would I use for tracking the maximum operation time between intervals? How would it be incremented?

1

1 Answers

1
votes

There is no such counter type. Trying to implement your own (read current value, compare, change if is a new max) is flawed under concurency conditions as there is no atomic interlockedcompareexchange API for performance counter.