Profile a slow ASP.NET or C# application to find which functions consume the most CPU time.
Diagnose memory leaks by recording a heap snapshot and seeing which objects are accumulating.
Build custom performance analysis tools using the TraceEvent library to process ETW or .NET Core trace data.
Collect performance traces from a Linux .NET Core service and analyze them on a Windows machine.
Download a single .exe and run it, no installation required, but reading the built-in Help guide first takes about 30 minutes.
PerfView is a free tool from Microsoft for diagnosing slow or memory-hungry Windows applications. You point it at a running program, it records what the CPU and memory are doing, and then it shows you where time and memory are being spent so you can figure out what to fix. It runs on Windows and can also read performance data collected from Linux machines. The tool is especially useful for programs built on the .NET platform, which is Microsoft's framework for building Windows applications and services. If you have heard of C# or ASP.NET, those run on .NET. PerfView has deep knowledge of how .NET programs work internally, which lets it give more detailed and accurate results than generic profilers. Under the hood, PerfView is built on a library called TraceEvent. That library knows how to collect and read low-level Windows event data (called ETW, Event Tracing for Windows) as well as the tracing format used by newer .NET Core applications. If you are a developer who wants to write your own tools to process that kind of data, you can use the TraceEvent library directly without using the PerfView interface at all. Using PerfView does not require building it from source. You download a single .exe file, run it, and the full user guide is built into the application under the Help menu. Video tutorials are available for people who prefer to learn by watching. If something goes wrong or you have a question, you can file an issue on the project's GitHub page and attach the recorded trace file so others can reproduce your exact situation. Building PerfView from source requires Visual Studio 2022 with a few specific components installed, all of which are available in the free Community Edition. The README describes exactly which components to select during installation.
← microsoft on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.