You can use perfmon out of the box to monitor CPU, memory and disk usage, as well as many special .NET performance counters. perfmon comes with windows.
Glaze is only required if you want to write your own perfmon or want to offer your own performance counters. The latter would be interesting only if your users would need to track this value (for example, you are developing a server application, and your users should make sure that there were no more than 10% of connections rejected due to an invalid moon phase).
Use the profiler to determine how much time you spend on certain functions.
The performance counter API allows you to control data along with existing performance counters (which can tell you, for example, that the Foo function becomes very slow every night after 11, because some other process crashes the disk), and the monitor can work as a service and create log files for later analysis.
You should find out if these benefits deserve additional problems with performance counters, or if you are better off working with a logging system.
There are quite a few examples out there that can make your work easier. However, he still pays to understand architecture and “official” terminology. Usually, the MS API do requires a lot of reading and looks for good shell code, which does not mean that they are always painful.
peterchen
source share