News for hackers. Stuff that matters.
Re:Scalene: a high-performance, high-precision CPU and memor... by albertzeyer on Thursday January 09, 2020 @02:27PM (#22004600)
Similar to PyFlame is also py-spy: https://github.com/benfred/py-spy

> While pyflame is a great project, it doesn't support Python 3.7 yet and doesn't work on OSX, Windows or FreeBSD.

I wonder how the CPU profiling in Scalene is different. It does not mention PyFlame or py-spy at all in the Readme. Of course, the memory profiler is some nice extra.

Re:Scalene: a high-performance, high-precision CPU and memor... by emeryberger on Thursday January 09, 2020 @03:48PM (#22005532)
Scalene author here. I was not aware of either tool - many thanks for the pointers! I just tried py-spy (I will try PyFlame on a Linux box momentarily). It's pretty cool, though having to run it as root on OS X isn't great (scalene runs without the need for root privileges; the CPU profiling part is pure Python). Py-spy does appear to efficiently track CPU perf at the line granularity (and does a lot of other stuff). It does a lot of things that scalene does not do, but not memory profiling. Also, I personally prefer scalene's line-level display of annotated source code vs. the flame graphs, but YMMV.
Re:Scalene: a high-performance, high-precision CPU and memor... by Znafon on Thursday January 09, 2020 @04:45PM (#22006221)
The possibility to run py-spy on an already running Python program in production is pretty awesome. Do you think Scalene could do this?