Access Keys:
Skip to content (Access Key - 0)

Getting Started with dotTrace Performance

dotTrace Performance lets you profile different kinds of .NET applications, including applications based on .NET Framework up to version 4.5, Silverlight 4 and 5, and even Windows Store applications. It offers a convenient way to uncover potential performance issues in your applications and find bottlenecks in your code.

There are two ways to start profiling your application: you can either launch dotTrace Performance as a standalone tool or from  Visual Studio. At the time of this writing, dotTrace Performance integrates into four versions of Visual Studio: 2005, 2008, 2010, and 2012.

Standalone. This mode is ideal for applications where the original project or source code is not available or when you want to run dotTrace Performance without having Visual Studio installed or launched.

  1. Start dotTrace Performance from the Windows Start menu.
  2. Click Profile on the Home tab.

From Visual Studio. This mode is ideal when you want to profile an existing project running under Visual Studio. 

  1. Start Visual Studio
  2. Open a solution.
  3. On the menu bar, choose dotTrace | Profile Startup Project for the startup project opened in Visual Studio, or dotTrace | Profile Application  to attach to a running .NET application.


Profiling an application

Next step is to select the type of the application you are going to profile. Note that dotTrace Performance Professional Edition allows you to profile more application types than Standard Edition. In this example we'll profile a web application hosted in IIS Express.

The Profiler Configuration dialog box that opens up lets you fine-tune your profiling experience. Depending on the selected application type, different sets of profiling options can be displayed.

One of the important settings that affect profiling speed and accuracy is Profiling Type which gives you three options:

  • Sampling profiling is the fastest and the least precise method. It allows you to quickly get a general idea of the application's performance.
  • Tracing profiling is slower, but more precise than Sampling. In this mode you can learn precise timing information and the number of calls on the method level.
  • Line-by-line profiling is the slowest, but the most accurate method. It lets you collect the most detailed information on methods that perform significant algorithmic work.

You can also choose the Time Measurement method to specify the granularity and accuracy of time measurement.

Click Run to start profiling. dotTrace Performance will attach to your application's process and start collecting performance data. The Controller window is also displayed.

Get a snapshot

Once you feel that all information you need has been collected, click Get Snapshot. This will capture the data and display it in a snapshot window.

Snapshots can be stored and compared, so you can see how code changes affected your application performance.

Analyzing snapshot data

dotTrace Performance offers you multiple views for analyzing snapshot information. The Threads Tree view shown by default allows you to drill down in the snapshot information based on the threads in your application.

The Call Tree view organizes data based on method calls, Plain List shows all the different methods that have been called, what other methods they have called, how long these calls took and so on.

The Hot Spots view shows methods that have the highest own time in your application. In other words: methods that dotTrace Performance identified as a potential performance issue.

Note that whenever you select a method, dotTrace Performance shows you the actual code for this method based on information provided by your application's debugging symbols. If no source code is available, dotTrace Performance will try to decompile the method from the assembly.

Once you've mastered these basics, learn the various techniques in analyzing profiler data. dotTrace Performance includes great features like remote profiling, navigating through method calls, filtering and folding and estimating performance gains. All of them are described on the dotTrace documentation page.

Finally, don't forget to check out JetBrains TV and JetBrains .NET Tools blog for more tips and tricks with dotTrace profilers. You might also like JetBrains on Facebook or follow dotTrace on twitter.

Adaptavist Theme Builder (4.2.2) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki