I used this tool a few month ago, as a way to quickly profile some slow running functions in one of my notebooks. The color is mapped to the cumulative run time of the line.
This project wraps py-heat https://github.com/csurfer/pyheat in a convenient to use ipython magic command. Pyheat presents a heat map of profiler output: i.e. the output of running your program and measuring the time to execute each line of python code. Pyheat in turn uses pprofile https://github.com/vpelletier/pprofile.
Profiling Python code is such a hot mess. Since Linesman is not available anymore I actually don't know a good tool to do development profiling except use cProfile and a lot of time I don't have. Production is worse. Only thing that (sort of works) is Elastic APM (RIP Opbeat which was phenomenal).
15 comments
[ 4.3 ms ] story [ 66.1 ms ] threadBtw, I took the liberty to post your project to my Python News aggregator over here: https://news.python.sc/item/99783ac6-50bc-42ea-9a48-8e66b538...
[0] https://github.com/csurfer/pyheat
Anyone have a better option out there?
https://github.com/pyutils/line_profiler
In prod, the pyinstrument profiler has worked well for me https://pyinstrument.readthedocs.io/en/latest/guide.html#pro...