views:

373

answers:

2

I'm trying to create a custom performance counter in C# based on per minute.

So far, I've seen only RateOfCountsPerSecond32 or RateOfCountsPerSecond64 available.

Does anybody know what are options for creating a custom counter based on per minute?

A: 

This won't be directly supported. You'll have to computer the rate per minute yourself, and then use a NumberOfItems32 or NumberOfItems64 counter to display the rate. Using a helpful name like "Count / minute" will make it clear what the value is. You'll just update the counter every minute. A background (worker) thread would be a good place to do that.

Alternately, you can just depend upon the monitoring software. Use a NumberOfItems32/64 counter, but have the monitoring software do the per-minute computation. The PerfMon tool built into Windows doesn't do this, but there's no reason it couldn't.

Alan McBee
A: 

You say you're using CounterDelta32: how do you get perfmon to poll the data once per minute?