Search code examples
c#asp.netperformance-testing

Execution time testing for c# method


I have a cs page with a few methods. When I try to load that page it takes a long time. Is there any way to identify how long each method is taking to fetch data? Instead of debugging is there any way of capturing the time spans?

Any tool or any other suggestions?


Solution

  • The Visual Studio Profiling Tools let developers measure, evaluate, and target performance-related issues in their code. These tools are fully integrated into the IDE to provide a seamless and approachable user experience.

    Profiling an application is straightforward. You begin by creating a new performance session. In Visual Studio Team System Development Edition, you can use the Performance Session Wizard to create a new performance session. After a performance session ends, data gathered during profiling is saved in a .vsp file. You can view the .vsp file inside the IDE. There are several report views available to help visualize and detect performance issues from the data gathered.

    MSDN REFERENCE