RunSnakeRun Python Profiler 2.0.0b4
Written by
on
in
Snaking.
I've just released version 2.0.0b4 of the RunSnakeRun profile-viewer module I mentioned in my PyCon presentation on profiling. This version runs reasonably well on Win32 platforms (as well as Linux, of course) and has tooltips for the SquareMap and text where there's sufficient room to display it.
Comments
Comments are closed.
Pingbacks
Pingbacks are closed.
Richard Tew on 03/31/2009 6:31 a.m. #
Does it work with Stackless? ;-)
Mike Fletcher on 03/31/2009 8:55 a.m. #
Well, the viewer, RunSnakeRun, works with whatever you dump from cProfile... does cProfile work with stackless? I'd guess no, since it doesn't even work with regular threads, but RunSnakeRun doesn't really have much to do with that.
Marius Gedminas on 03/31/2009 11:56 a.m. #
This is a very good presentation about profiling!
Re: slide 42 ("some assembly required for KCacheGrind") -- there's <a href="http://pypi.python.org/pypi/pyprof2calltree">pyprof2calltree</a> on PyPI that helps somewhat (if you can remember what it's called).
Re: slide 54 ("how do I profile just this one slow page among hundreds?") -- have you seen <a href="http://pypi.python.org/pypi/profilehooks">profilehooks</a> on PyPI? Sometimes adding a @profile decorator on your function is simpler than finding the call site and converting it to three lines using profiler.runcall().
I'll release a newer version with cProfile support later today (oops).
I also see that there's a different @profile decorator, from <a href="http://pypi.python.org/pypi/profilestats">profilestats</a> on PyPI. Perhaps that one is better maintained ;-)
Mike Fletcher on 04/01/2009 12:03 a.m. #
Thanks. Hadn't seen pyprof2calltree, had been using a CookBook recipe turned into a local module for that. Also hadn't seen profilehooks or profilestats.
There's been a couple of times that people have mentioned the "intrusiveness" of Python profiling/debugging tools at this PyCon. Would be nice if you could parameterize from the command line (or have the interpreter connect to your IDE and request parameterization when you triggered a profile/debug) without needing to alter the code you're working on.