Calmcode - pyinstrument: speedscope

Flamegraphs with Pyinstrument.

1 2 3 4 5 6 7

You can also use pyinstrument to generate speedscope files which can be used by to generate interactive flamegraphs. To generate a speedscope.json file for your script you may run:

pyinstrument -r speedscope -o speedscope.json path/

From here, you can open this file in to experience an alternative to the tree-based view.