3 ms·
Similar to PyFlame is also py-spy: https://github.com/benfred/py-spy https://github.com/benfred/py-spy > While pyflame is a great project, it doesn't support P
by albertzeyer 7y ago
Similar to PyFlame is also py-spy: https://github.com/benfred/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.
- emeryberger 7y agoScalene 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.
- Znafon 7y agoThe possibility to run py-spy on an already running Python program in production is pretty awesome. Do you think Scalene could do this?