Question

Got a quick question about how to monitor the performance of my Windows based application (console app, Win Forms app, or Services). I was looking for information about how to correctly and efficiently monitor the performance (CPU utilization, Memory utilized, processes, etc...) for application that were developed in the .NET environment. Is there something in the code that I need to program to trigger availability from WMI? Is there a specific way to create performance counters related directly to your application that your created? I would like to get as much detail about the running app as possible.

If it is something that needs to be coded on the application to invoke the WMI monitors, please list examples.

Additionally, are there any pre-built (open source) application performance testing tools that anyone recommends?

Was it helpful?

Solution

A great way to get insights into the performance of your app is to add ETW instrumentation. This allows you to monitor what is going on and collect timings as your application is running. If you instrument you app you can answer questions about how long various actions take to complete inside your app.

The .NET runtime and most other components in the Windows stack utilize ETW as well, so you can also get detailed information about memory usage, waits, I/O and so forth.

ETW is available to managed apps through the EventSource class.

You can use Windows Performance Toolkit or PerfView to record and analyze events.

OTHER TIPS

Look at the redgate suite; you can get a free trial. They aren't open source, but they are worth the price.

http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/

You can open Performance Monitor and already see all the performance counters .Net (and Windows) give you out of the box. This include memory usage, CPU utilization, locking contention, exceptions and so forth.

You can add your own specific performance counters and collect them at the exact same way using PerformanceCounter

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top