Using the Sampling method in Visual Studio to collect performance statistics

When you start sampling on your application, it collects information about the methods that are executing in the application flow and provides a summary as a result. Methods that are heavily executed during the execution cycle become part of the active function call tree known as Hot Path. Once the test is completed, it generates the timeline graph that you can use to look for the bottleneck.

In Visual Studio 2015 or greater, we can start the sampling process by going to the Analyze > Performance Profiler... menu. Make sure the configuration is set to release mode.

Once you run your application, it starts recording your application flow and identifies the Hot Path. ...

Get Enterprise Application Architecture with .NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.