6 ms·
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 cProf
by Beltiras 5y ago
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?
- baq 5y agopy-spy with speedscope output is what I use in both prod and dev.
- dave_sullivan 5y agoDoes line_profiler not work anymore? https://github.com/pyutils/line_profiler https://github.com/pyutils/line_profiler
- Beltiras 5y agoI suppose it does. I miss call graphs thou.
- BiteCode_dev 5y agoAustin: https://github.com/p403n1x87/austin https://github.com/p403n1x87/austin
- leontrolski 5y agoI've always used snakeviz with the stdlib profiler https://jiffyclub.github.io/snakeviz/ https://jiffyclub.github.io/snakeviz/ In prod, the pyinstrument profiler has worked well for me https://pyinstrument.readthedocs.io/en/latest/guide.html#profile-a-web-request-in-flask https://pyinstrument.readthedocs.io/en/latest/guide.html#pro...
- memco 5y agoI haven't tried it yet, but Scalene looks interesting: https://github.com/plasma-umass/scalene https://github.com/plasma-umass/scalene.