I'm trying to show the number of times an operation occurred since the last performance iteration. I have created a performance counter using the following:
var clearStateCounterData = new CounterCreationData()
{
CounterName = ClearStateName,
CounterHelp = "The number of times the service state has been cleared since the last performance iteration",
CounterType = PerformanceCounterType.CounterDelta32
};
Then I call counter.Increment()
in my application but I never see the performance counter value move. Even if I run it multiple times per second.
Is there something special I need or a specific value I need to increment by to get the PerformanceCounter to show something?
Figured it out
I put an example of using this counter in an answer below. Thanks for the help guys.