dotTrace 2022.1 Help

Profile Static Method

Profiling of static methods is based on the ReSharper's run configurations feature. It gives you an ability to create a number of predefined configurations with different run parameters for your startup project, an arbitrary executable, or even any static method. As dotTrace shares the ReSharper platform, it is able to profile any run configuration including the ones for static methods.

To profile a static method

  1. Open your solution in Visual Studio.

  2. Open the file containing the static method you want to profile.

  3. Open the action list for the method by placing cursor on the method and pressing Alt + Enter.

  4. In the list, select Debug method | Profile ([profiling_type]) method.

    Note that this session will use the profiling type that is currently selected in the Performance Profiler window.

  5. In the Profile Startup Project window, configure profiling settings as described in Configure Profiling Session.

  6. Click Start.

  7. The profiled method will be run under a special JetLauncher process. After the method finishes working, the process will offer you to press any key. This will end the process and take a snapshot.

  8. Analyze the collected snapshot either in the Performance Viewer or Timeline Viewer (depends on the profiling type you select).

Last modified: 19 April 2022