Profile Static Method
Profiling of static methods is based on the ReSharper's run configurations feature. It lets you 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.
Open your solution in Visual Studio.
Open the file containing the static method you want to profile.
Place the caret at the method and press Alt+Enter
In the list, select
.Note that this session will use the profiling type that is currently selected in the Performance Profiler window.
In the Profile Startup Project window, configure profiling settings as described in Configure Profiling Session.
Click Start.
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.
Analyze the collected snapshot in the dotTrace Viewer.