pablogsal · GitHub

Bug report

Bug description:

Differential flamegraphs group paths without line numbers, but attach the combined values to every rendered line node. This duplicates the self time.

import time
def f():
    time.sleep(0.5)
    time.sleep(0.5)
f()
python -m profiling.sampling run --binary -o baseline.bin demo.py
python -m profiling.sampling run --diff-flamegraph baseline.bin -o diff.html demo.py

Both f line nodes get the full combined self time. Their annotated self time is twice the actual self time, even though the profiles are identical.

CPython versions tested on:

3.16

Operating systems tested on:

Linux

Linked PRs

Read the original on github.com ↗