Can you open perfmon.exe, clear any current counts and add your custom app counters from C#?
Thinking there about perfmon API but I can't find it.
Performance Counters are, ahem, not very well suited for tracking application-level metrics.
In Linux/Unix world there's an excellent Graphite and StatsD combination, and we've ported it to .NET: Statsify.
What it allows you is to collect all kinds of metrics from within your application: number of database queries, time it takes to invoke a Web Service, track number of active connections, etc. -- all with simple API like
Stats.Increment("db.query.count");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With