Comparing profiles

When you complete optimizing, it's useful to see what progress you've made. The comparison mode lets you easily see the difference between two profile sessions. You can continue to view data as a Call Tree or a Table, but instead of absolute time values, you see time differences.

For example, you can compare two profiles to evaluate results before and after function optimization. In Compare mode, each column shows the change in values compared to the other session. Time and Count columns show the new value minus the old value. If there's no new value match for an item, its old value is used. If no old value match exists, the item will have a + indicator beside the new value.

Comparing two profiler sessions

Comparing two profiler sessions.

In this case, you must have at least two Application Profiler sessions to compare.

To profile in this case, follow these steps:


  1. In the Profiler Sessions view, select the two sessions that you want to compare.
  2. Right-click to open the context menu and select Compare menu time.

    View the changes based on the results of the Comparison mode.

  3. The IDE shows colored arrows to indicate the old and new results for the selected sessions.
  4. Optional: You can use filters to remove insignificant results (<1% of difference), using Filter By:

    Filtering results


    1. From the Execution Time view toolbar menu, select Filters to open the Filter dialog.
    2. Specify any filtering criteria.
    3. Click OK.

After you profile

The Execution Time view shows the difference between two selected sessions, and you can observe these differences by:


Note: In the Profiler Sessions view, you can use the Take Snapshot feature to freeze the current state of the Application Profiler data while the actual session data keeps changing. The snapshot data remains frozen and can later be compared with the final results, or other snapshots of the same session. In the Execution Time view, this action also automatically switches to view a Comparison mode to dynamically show the updated difference between the current state and the snapshot.
Related concepts
Using Function Instrumentation with the Application Profiler
Using Sampling and Call Count instrumentation mode
Using Function Instrumentation mode for a single application
Using Function Instrumentation in the System Profiler
Related tasks
Creating an Application Profiler session
Creating a profiler session by importing profiler data
Profiling a single-threaded application
Profiling a running process for an existing project
Using postmortem profiling for Call Count and Sampling
Postmortem profiling
Running an instrumented binary with profiling from a command prompt (Function Instrumentation mode)
Taking a snapshot of a profiling session