Monitoring with Performance Counters

Using event logs is a great way to log discrete messages that can be used to trace the flow of execution for a given application or its individual components. However, in many cases, it’s more valuable to monitor the dynamism of an application, which typically has a numeric nature. Examples include tracing the number of user requests a service is handling, object allocation rates, resource pool utilization, and so on. For such scenarios, the use of performance counters comes in handy.

Just like event logging, the concept of performance counters is rooted in the operating system’s facilities. A whole bunch of counter types exist, which indicate their numeric nature. Examples include time-based counters (for ...

Get C# 5.0 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.