Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you open perfmon.exe, clear any current counts and add your custom app counters?

Tags:

c#

.net

perfmon

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.

like image 355
CodingHero Avatar asked Jul 02 '15 10:07

CodingHero


1 Answers

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");
like image 178
Anton Gogolev Avatar answered Oct 29 '22 18:10

Anton Gogolev