PerfView is a free performance analysis tool that helps isolate CPU and memory-related performance issues. It is a Windows tool, but it also has some support for analyzing data collected on Linux machines. It works for a wide variety of scenarios, but has a number of special features for investigating performance issues in code written for the .NET runtime. If you are unfamiliar with PerfView, there are PerfView video tutorials. Also, Vance Morrison's blog gives an overview and getting started information. PerfView is built on a library called Microsoft.Diagnostics.Tracing.TraceEvent, which knows how to both collect and parse Event Tracing for Windows (ETW) data. Thus if there is any information that PerfView collects and processes that you would like to manipulate yourself programmatically, you would probably be interested in the TraceEvent Library Documentation.
Features
- One of the unusual things about PerfView is that it incorporates its support DLLs into the EXE itself
- Another unusual thing about PerfView is that it includes an extension mechanism complete with samples
- You can also build PerfView from the command line
- One of the invariants of the repo is that if you are running Visual Studio 2022 and you simply sync and build the PerfView.sln file
- Build perfView by typing the command 'msbuild'
- Change directory to the base of your PerfView source tree (where PerfView.sln lives).
- Restore the nuget packages by typing the command 'msbuild /t:restore'