Differential flamegraphs are incorrectly scaled across sampling rates
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
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
- gh-154082
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the differential flamegraph comparison described in the issue with 1 kHz and 100 Hz profiles, then trace where sample counts are scaled and where sampling intervals convert samples to displayed time. Done means identical profiles at different sampling rates compare at approximately 0% while displayed time conversion remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100