Skip to content

Some helpers for creating and using Windows performance counters.

Notifications You must be signed in to change notification settings

AnthonyMastrean/Watson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Watson

yes, I'm going to change the name... it's horrible

Configure your desired custom performance counters at application startup or as part of a separate installation procedure.

new Watson
    .FluentConfigurator()
    .AddCategory("Watson.Example")
        .AddCounter("NumberOfThings")
        .AddCounter("AverageNumberOfThingsOverTime")
        .CreateOrUpdate()
    .Initialize();

Then, in your application classes that are publishing performance statistics, get a performance counter out and use it!

private static readonly PerformanceCounter _counter = WatsonManager.GetPerformanceCounter("Watson.Example.NumberOfThings");
private static readonly PerformanceCounter _avgCounter = WatsonManager.GetPerformanceCounter("Watson.Example.AverageNumberOfThingsOverTime");

About

Some helpers for creating and using Windows performance counters.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages