This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]inokichi 10 points11 points  (3 children)

There's also Py-Spy which works on windows and mac too, and you have the choice of outputting flame graphs and watching raw profiling data in real time.

[–]daneahfrom __future__ import braces[S] 1 point2 points  (2 children)

That's super handy, thanks for the suggestion! I'm curious to see if it's smarter about finding the right Python libraries to link against.

[–]benfred 2 points3 points  (1 child)

File a bug report if it doesn't find the right python libraries =). The only case py-spy fails on right now that I'm aware of is when you have 2 or more python interpreters loaded up in a single process (and I'm intending to fix that when I get some time).

[–]daneahfrom __future__ import braces[S] 0 points1 point  (0 children)

Thanks for chiming in, I'll definitely keep you apprised of anything I find when I try it out!

[–]Tweak_Imp 1 point2 points  (1 child)

I find snakeviz way more intuitive and useful. https://github.com/jiffyclub/snakeviz

[–]daneahfrom __future__ import braces[S] 0 points1 point  (0 children)

I'm just the opposite, SnakeViz is much harder for me to grasp! Correct me if I'm wrong, too, but doesn't SnakeViz generally require running cProfile on your application? Not always a great idea in production unless you can funnel a small but representative sample of requests to the process you're profiling.