Off topic: this is the same Brendan Gregg of flame charts fame [0][1]. It has solved my skin quite a few times when trying to figure out performance bottlenecks in Python apps (using pyflame[2] to capture data and FlameGraph[1] to convert it to displayable SVG).

[0] http://www.brendangregg.com/flamegraphs.html

[1] https://github.com/brendangregg/FlameGraph

[2] https://github.com/uber-archive/pyflame

Looks like `pyflame` was recently deprecated & archived.

I've had success using `py-spy` for debugging perf issues. Flamegraphs are much nicer to work with than cProfile's output.

https://github.com/benfred/py-spy