Skip to content

Compare Profiles

Compare mode in Continuous Profiling allows you to see performance changes between two CPU profiles. This helps you analyze performance differences between time periods, releases, or environments. By highlighting changes in CPU usage and call stacks, compare mode allows you to quickly spot regressions and evaluate possible optimizations.

For example, after deploying a new version, developers can use compare mode to validate that CPU usage decreased in targeted functions while also catching unexpected regressions. Instead of manually scanning two flame graphs, the feature highlights improvements in green, regressions in red, and functions that appear only in one profile in blue or purple - making comparisons faster, more accurate, and more reliable.

Why compare mode?

This feature helps address:

  • A lack of baseline comparisons, which makes it difficult to validate improvements or identify regressions.
  • Manual analysis of two profiles which is slow and error-prone.
  • Subtle performance changes going unnoticed without automated highlighting.

User benefits

  • Faster troubleshooting: Quickly identify where performance changed between two runs.
  • Higher confidence: Automated diffing removes guesswork and supports data-driven decisions.
  • Better optimization cycles: Validate fixes and proactively catch regressions before they impact production.

Key capabilities

  • Diff highlighting – Quickly see the changes:

    • 🔴 Red = higher CPU usage
    • 🟢 Green = lower CPU usage
    • 🔵 Blue or 🟣 purple =
      • In flame graphs, these colors represent functions unique to one profile (A or B).
      • In CPU Usage charts, these lines represent the distinct trend for each profile over time, making it easy to compare how CPU consumption evolves in A vs. B. Two lines (blue for A, purple for B) give a clear breakdown of how each timeframe behaves.

    Diff mode makes it easy to spot regressions, confirm optimizations, and detect new or removed functions.

  • Side-by-side display: View two CPU profiles at once in a synchronized layout:

    • Profile A: a baseline (e.g., older version, pre-fix)
    • Profile B: a newer profile (e.g., current version, post-fix)
  • Custom timeframe or version selection: Choose any two profiles by time range, release tag, or environment.
  • Automated diff highlighting: See differences instantly.
  • Before-and-after validation: Confirm whether your code fix reduced CPU consumption or added regressions.

Compare mode UI navigation

Access compare mode

To see performance changes between the CPU profiles, navigate to APM > Service Catalog >Service Drilldown > Profiles > Compare or APM > Service Catalog > Profiles view > Service Drilldown > Compare.

Set a timeframe for comparison

You can define the timeframe for comparing profile A and profile B using either the time picker or custom fields.

  • Default behavior: When you select a range through the time picker, the system automatically splits the duration evenly between profile A and profile B.
  • Customizing the split: If you need finer control, you can adjust how the time is allocated from the CPU Usage window or drag the edges of line chart boxes that represent the timeframe selected for A and B.

When setting up comparisons, the blue rectangle (A) and the purple rectangle (B) represent the selected timeframes for each profile. These rectangles are interactive and can be adjusted directly on the chart.

How it works:

  • Move rectangles: Drag either rectangle left or right to shift the timeframe for profile A or profile B.
  • Resize handles: Use the handles on each side of a rectangle to shorten or extend its time window.
  • Overlap: Rectangles can overlap each other. When they overlap, the two profiles share part of the same time range. This lets you compare partially intersecting time windows rather than separate periods.
  • Hover: Hovering over the overlapped area shows combined metrics for both profiles at that point in time (e.g., CPU usage for A and B side by side).

Filter CPU usage

You can filter usage by pod, node, or other OTel labels to display data relevant to your specific needs.

Visualize CPU usage over time

Visualize CPU usage over time for the two profiles side by side, helping you quickly detect performance trends.

  • Y-axis (CPU time / core): Measures CPU time / core used by the profile. Spikes may indicate heavy computations, inefficient queries, or memory management issues.
  • X-axis (time): Helps correlate CPU trends with deployments, traffic changes, or system events.

You can switch between two perspectives when analyzing a profile:

  • Time view: Shows the total processing time, helping you identify where your application spends the most CPU time.
  • Core view: Displays how CPU activity is distributed across cores, making it easier to spot imbalances, underutilization, or contention caused by specific threads.

Customize visualizations

Compare profiles by switching between views and modes.

Split view

Split view displays two flame graphs and tables side by side - profile A and profile B. Both graphs are synchronized: zooming, panning, or hovering over a function in one graph highlights the corresponding function in the other. This makes it easy to visually trace differences in structure and CPU consumption frame by frame. This view combines flame view and table view, making it a good starting point for comparison.

Differential (diff) mode: In this mode, both profiles are overlaid into a single combined flame graph. Color highlighting is applied only to code present in both profile A and profile B, showing the change in CPU usage:

  • 🔴 Red = functions using more CPU
  • 🟢 Green = functions using less CPU

This mode provides an at-a-glance overview of where performance has changed, making it ideal for spotting regressions or confirming optimizations.

A/B only: View a single-profile render. Choose A only or B only per panel to isolate structure and self/total time. Helpful when you want to study one profile precisely, then switch to the other. This mode is best used in the flame side-by-side view, where you can place one profile in each panel for direct comparison. Color highlighting illustrates the differences:

  • 🔵 Blue = Code unique to A
  • 🟣 Purple = Code unique to B

Functions of the two profiles and the diff are presented along with their self-CPU time and total CPU time.

  • Self CPU time ("Self"): The amount of CPU time spent exclusively in that function (not including calls to other functions).
  • Total CPU time ("Total"): The total CPU time spent in that function, including time spent in any functions it calls. High Total CPU time suggests functions that call expensive operations.

Flame view

Flame view provides flexible options for visualizing and comparing CPU profiles. You can choose how to display profiles, whether you want a combined view, side-by-side flames, or an isolated profile.

  • Side-by-side mode: Displays two panels next to each other. You can select which profile appears in each panel (diff, A, or B). This is useful if you want to study differences while still seeing the same frames rendered separately. Side-by-side mode can be turned on or off depending on your workflow.

  • A+B (combined view): Renders both profiles together, showing the aggregate picture of CPU usage.
  • Single flame (diff): Shows one combined flame graph with diff highlighting.
  • Single flame A: Displays only Profile A.

  • Single flame B: Displays only Profile B.

Tip

If the difference between the two profiles is either too large or too small, Flame view will display a message prompting you to adjust your settings to explore more data.

Table view

Table view presents CPU profile comparisons in a structured, sortable table format. This makes it easy to evaluate differences, sort by impact, and export the data. Use the Columns filter in the top-right corner to customize which data points are visible in the table.

  • Default (diff + A + B): Displays profile A, profile B, and the differential columns together for a complete side-by-side view (self and total).

  • No diff: Shows only raw values from profile A and profile B without differential data (self and/or total).
  • Only A/B: Displays profile A/B metrics (self and/or total).
  • Only A/B with diff: Displays profile A/B metrics alongside the calculated difference (self and/or total).
  • Diff only: Focuses entirely on the calculated differences between the two profiles (self and/or total).

Customizable Columns:

You can configure which metrics are visible in the table. Options include:

  • General: Name, Select All.
  • A / B: Self, Total
  • Diff: Self %, Total %

This flexibility allows you to tailor the view to your analysis - for example, focusing on percentages when looking for proportional regressions or analyzing critical hotspots.