Continuous profiling is now GA

Last updated:

Compare Profiles

Compare baseline and comparison datapoints or workloads and investigate changes with a differential flame graph.

Use Compare to compare datapoints over time or workloads with separate profile filters.

Choose a baseline and comparison

  1. Open Profiling and choose the dataset, time range, and Profile type.
  2. Click Compare.
  3. In A Baseline, set Filter profiles... for the reference workload. Use Sum by if you need a chart breakdown.
  4. In B Comparison, set the filters and chart breakdown for the workload you want to compare.
  5. Select the reference datapoint in A's chart and the comparison datapoint in B's chart.
  6. Inspect the differential Flame Graph below the charts.

To compare datapoints over time, keep the workload filters the same on both sides. To compare workloads, use different filters.

Baseline and comparison CPU charts with separate selected datapoints and a differential flame graph

Check the selected intervals, and use the same profile type and units on both sides. Differences in load, replica count, or interval duration can change the values without a code change.

Read the differential flame graph

The legend shows the change in B Comparison relative to A for the active comparison mode:

  • Green, less in B: The frame contributes less in B than in A.
  • Red, more in B: The frame contributes more in B than in A.

In the On-CPU screenshot, the legend ranges from −786.04ms less in B to +786.04ms more in B. Read the scale and units shown for your comparison.

Check traffic and workload scope before treating a red frame as a regression or a green frame as an optimization.

Relative and Absolute

The comparison toolbar has Relative and Absolute modes. Dash0 picks a default mode from the query:

  • Absolute for memory profiles.
  • Relative for CPU profiles, because the two selections can cover time ranges of different lengths.

This default is a heuristic and can be wrong for your comparison. Check the selected mode, and read the updated legend before interpreting frame colors or values.

Narrow the difference to relevant code

Use Add filter in the differential flame graph toolbar to focus on changed paths. A common choice is a Source file filter that matches your repository's paths, which reduces the comparison to your own code. You can also keep stacks involving a compression function to investigate increased compression work, or hide runtime frames.

The profile filters in A and B select the workloads. Stack and frame filters select the code shown below them. See Filter and Group Profiles.

Use Group by, the call-stack order control, and Settings to adjust the flame graph. Reverse the call-stack order to inspect leaf functions behind an increase.

Further Reading