Skip to content

Differential flamegraphs are incorrectly scaled across sampling rates #154032

Description

@pablogsal

Differential flamegraphs compare raw sample counts after scaling the baseline by sampled wall time. This makes identical profiles look very different when the sampling rates differ.

For example, using a 1 kHz baseline and profiling the same workload at 100 Hz reports around -90% for unchanged leaf functions. Using the same rate for both profiles reports approximately 0%.

We should normalize the sample counts consistently and use the sampling interval only when converting samples to time for display.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-profilingtype-bugAn unexpected behavior, bug, or error

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions