Summary

The System.Diagnostics namespace includes a framework for supporting performance counters. Performance counters enable a program to be monitored for performance and scalability. At a basic level, predefined system performance counters can be used to examine a program's behavior.

The performance counter framework supports customized performance counters for situations in which it's necessary to monitor specialized behavior. Custom performance counters identify conditions specific to an application and must be explicitly managed by the application.

Sampling provides more sophisticated monitoring of program performance. This technique takes a number of samples and performs calculations on a regular basis. More so than other methods, the ...

Get C# 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.