Bug report
Bug description:
As discussed with @pablogsal during EuroPython sprints:
The hover views in Tachyon’s flamegraph format show incorrect values for the total time. Using this simple example script (flamegraph_demo.py):
import time
def main():
f_1()
f_2()
def f_1():
time.sleep(0.5)
def f_2():
time.sleep(1)
main()
python -m profiling.sampling run --flamegraph --browser flamegraph_demo.py
generates the following output:

The time displayed in the sidebar is correct; but hovering over the flamegraph shows an incorrect “Total time”.
Additional notes:
- The total time displayed is proportional to the sampling rate; e.g., when running with
-r 10kHz (instead of the default 1kHz above), the “Total time” is displayed as 15 ms instead of 1.50 ms.
- This issue is specific to the
--flamegraph output format; using --gecko gives correct values.
- All tested in 3.15.0b4.
CPython versions tested on:
3.15
Operating systems tested on:
macOS
Linked PRs
Bug report
Bug description:
As discussed with @pablogsal during EuroPython sprints:
The hover views in Tachyon’s flamegraph format show incorrect values for the total time. Using this simple example script (
flamegraph_demo.py):generates the following output:

The time displayed in the sidebar is correct; but hovering over the flamegraph shows an incorrect “Total time”.
Additional notes:
-r 10kHz(instead of the default 1kHz above), the “Total time” is displayed as 15 ms instead of 1.50 ms.--flamegraphoutput format; using--geckogives correct values.CPython versions tested on:
3.15
Operating systems tested on:
macOS
Linked PRs