News for hackers. Stuff that matters.
Re:Pyheatmagic: Profile and view your Python code as a heat map by franga2000 on Wednesday November 03, 2021 @03:54AM (#29092082)
It would probably make more sense to link to the library [0] directly instead of the IPython module (or update the title accordingly)

[0] https://github.com/csurfer/pyheat

Re:Pyheatmagic: Profile and view your Python code as a heat map by Beltiras on Wednesday November 03, 2021 @06:00AM (#29092688)
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).

Anyone have a better option out there?

Re:Pyheatmagic: Profile and view your Python code as a heat map by leontrolski on Wednesday November 03, 2021 @07:44AM (#29093346)
I've always used snakeviz with the stdlib profiler https://jiffyclub.github.io/snakeviz/

In prod, the pyinstrument profiler has worked well for me https://pyinstrument.readthedocs.io/en/latest/guide.html#pro...

Re:Pyheatmagic: Profile and view your Python code as a heat map by BiteCode_dev on Wednesday November 03, 2021 @07:39AM (#29093319)
Re:Pyheatmagic: Profile and view your Python code as a heat map by p403n1x87 on Wednesday November 03, 2021 @09:54AM (#29094564)
Re:Pyheatmagic: Profile and view your Python code as a heat map by Beltiras on Wednesday November 03, 2021 @07:42AM (#29093336)
This looks really promising.
Re:Pyheatmagic: Profile and view your Python code as a heat map by dave_sullivan on Wednesday November 03, 2021 @07:26AM (#29093213)
Does line_profiler not work anymore?

https://github.com/pyutils/line_profiler

Re:Pyheatmagic: Profile and view your Python code as a heat map by Beltiras on Wednesday November 03, 2021 @07:44AM (#29093349)
I suppose it does. I miss call graphs thou.
Re:Pyheatmagic: Profile and view your Python code as a heat map by memco on Friday November 05, 2021 @09:42PM (#29126761)
I haven't tried it yet, but Scalene looks interesting: https://github.com/plasma-umass/scalene.
Re:Pyheatmagic: Profile and view your Python code as a heat map by baq on Wednesday November 03, 2021 @07:49AM (#29093386)
py-spy with speedscope output is what I use in both prod and dev.
Re:Pyheatmagic: Profile and view your Python code as a heat map by sebst on Wednesday November 03, 2021 @03:52AM (#29092076)
That looks promising and I’ll give it a try. I recently used birdseye a lot to profile complex code blocks.

Btw, 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...

Re:Pyheatmagic: Profile and view your Python code as a heat map by brtknr on Wednesday November 03, 2021 @02:55AM (#29091793)
It is not explained anywhere what the heat map is of… is it the age of the line or the number of commits? Is this configurable or what?
Re:Pyheatmagic: Profile and view your Python code as a heat map by mattip on Wednesday November 03, 2021 @03:40AM (#29092022)
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.
Re:Pyheatmagic: Profile and view your Python code as a heat map by brtknr on Thursday November 04, 2021 @01:50PM (#29110374)
I think it warrants an explaination of what py-heat is rather than assuming that the reader knows.
Re:Pyheatmagic: Profile and view your Python code as a heat map by slock83 on Wednesday November 03, 2021 @03:07AM (#29091866)
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.