dotTrace 2020.2 Help

Profile Windows Service

To profile a .NET Windows service

  1. Run dotTrace as a standalone application. The dotTrace Home window will open.

  2. In the left panel, select Profile Local App.

  3. In the middle panel in Profile Application, select Windows Service.

  4. In the right panel, in Windows Service:

    • In Service, select the service you are going to profile.

    • Optionally, if your service requires command-line arguments, select Advanced and specify Arguments.

    • Optionally, if your service requires other services to be started, select Advanced and Start dependent services.

    For more details on Windows service options, refer to the Windows Services section.

  5. In Profiler Options, specify profiling type. Typically, you should choose between Sampling (evaluate performance and determine slowest methods in your app) and Timeline (determine slowest methods and how method calls are distributed in time).
    For more details on profiler options, refer to the Profiler Options section.

  6. Optionally, if you are going to control profiling session (take snapshots, end session, and so on) using the API (rather than the Controller window), select Advanced and Use profiler API. For more details on how to control profiling using the API, refer to the Control Profiling Session with API chapter.

  7. Click Run.

  8. Collect profiling data (snapshots). For more details on how to control profiling session, refer to Control Profiling Session (if you control the session manually) or to Control Profiling Session with API (if you control profiling using the API).

  9. After you collect the data, detach the profiler using the Detach button of the Controller window. If you use the API to control profiling, detaching must be provided by your code.

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

Last modified: 06 August 2020