Snapshot Comparison in dotTrace
dotTrace lets you spot problem portions of code with great ease and accuracy. Once all major bottlenecks are located, you can start eliminating these bottlenecks.
After you apply certain optimization effort, it would be nice to compare the performance of your application before and after the optimization.
dotTrace provides a useful feature that lets you assess the results of optimization with great precision. The feature’s called snapshot comparison.
Let’s see how it works.
It is assumed that you have saved the first snapshot (before optimization). Then you do some work on the application to optimize its bottlenecks.
To see the results of optimization, perform the following steps:
- Open the first snapshot (before optimization) in dotTrace.
- Profile your application once again to get a snapshot of the application after the optimization.
- Once the second snapshot is loaded, either choose Tools | Compare CPU Tabs on the main menu or click the Compare CPU Tabs button on the main toolbar.
dotTrace will now load the comparison snapshot. It looks like a regular snapshot but compares two states of the same application. Consider the comparison snapshot of the sample application that comes bundled with dotTrace:
It compares two working modes of the sample application. The first snapshot was taken in the slow mode, the second one in the fast mode.
The comparison snapshot offers a straightforward color-coding scheme: everything rendered green represents performance enhancements, everything red represents performance decreases.
While navigating the snapshot’s call tree, you can always get a precise indication on how much faster (or maybe slower) certain methods have become.
For each and every method you get a numerical representation of the performance enhancements. You can examine fluctuations in the following three parameters: relative change in time consumed (%), absolute change in time consumed (ms) and change in the number of calls.
Any number of custom filters can be applied to the comparison snapshot just like to a regular one. It helps you to exclude from view those items that are really of no interest to you in terms of performance alterations.
All the useful call tree navigation features are available here as well. Use To Next/Previous Unfiltered Node (Ctrl+Right/Left) and To Next/Previous Important Node (Shift+Ctrl+Right/Left) as much as you like.
Snapshot comparison is the ultimate way to assess the results of optimization and get a precise representation of the bottleneck elimination efforts.
Subscribe to Blog updates
Thanks, we've got you!
Eager, Lazy and Explicit Loading with Entity Framework Core
Entity Framework Core (EF Core) supports a number of ways to load related data. There’s eager loading, lazy loading, and explicit loading. Each of these approaches have their own advantages and drawbacks. In this post, let’s have a quick look at each of these ways to load data for navigational prope…
OSS Power-Ups: bUnit – Webinar Recording
The recording of our webinar, OSS Power-Ups: bUnit, with Egil Hansen and Steven Giesel, is available. This was the twelfth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webi…
Accelerating Your Testing Workflow with Unit Test Creation and Navigation
Unit tests play an important role in our daily development workflow. They help us ensure our codebase's correctness when writing new functionality or performing refactorings to improve readability and maintainability. In the process, we often create new test files that accompany the p…
Introducing Predictive Debugging: A Game-Changing Look into the Future
With the introduction of debugging tools, software developers were empowered to interactively investigate the control flow of software programs to find bugs in live environments. At JetBrains, we've always strived to improve the art of debugging. Besides the more standard things you expect from a de…