Comparing Profiling Datacompare snapshotscompare call stacks
As your application evolves, you need an ability to see how code changes impact performance. dotTrace helps you keep track of such changes. For example, you can:
- inspect differences in execution time of a function before and after code optimisation
- find out whether the number of function calls differs greatly in two different call stacks
To compare two call stacks
- Open at least two snapshots you want to compare or two tabs of the same snapshot.
- Choose a function call to be compared.
- On the menu bar, choose Compare Snapshots on the toolbar. The Choose Tab to Compare drop-down list appears. The list contains names of tabs of all opened snapshots grouped by snapshots.
- Click an item from the drop-down list.
Comparison results are displayed in a new tab. The difference is represented by negative and positive values of function statistics.
Negative values, that are shown in green, represent decrease in function statistics and show improvement in performance.
Positive values, that are shown in red, represent increase in function statistics and show deterioration of performance.
When the number of function calls in the call stacks being compared is different, then a comparison snapshot can be represented in two modes depending on the way of calculating the execution time difference. To switch between the modes, click Show original or Normalize time by number of calls on the toolbar at the top of the comparison snapshot. The first mode is used by default. So, dotTrace calculates the difference between execution time and number of function calls made in two call stacks. Although it is good enough, dotTrace can also take into account the difference between the number of function calls, normalize the number of calls and calculate the time that is really gained or lost. For example, you compare some call stack in a new snapshot with the same call stack in an old snapshots. If there is a new function in the first snapshot, the whole row is displayed in red. If some function is missing, the whole row is displayed in green.