Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Application(s) and performance monitoring [closed]

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?

like image 996
CodingRiot Avatar asked Mar 20 '23 18:03

CodingRiot


1 Answers

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.

like image 113
Brian Rasmussen Avatar answered Apr 01 '23 21:04

Brian Rasmussen