pythonwindowspython-2.7profilingcprofile

What tools should I use to profile Python code on window 7


I want to profile python code on Widnows 7. I would like to use something a little more user friendly than the raw dump of cProfile. In that search I found the GUI RunSnakeRun, but I cannot find a way to download RunSnakeRun on Windows. Is it possible to use RunSnakeRun on windows or what other tools could I use?

Edit: I have installed RunSnakeRun now. That's progress, thanks guys. How do you run it without a linux command line?

Edit 2: I am using this tutorial http://sullivanmatas.wordpress.com/2013/02/03/profiling-python-scripts-with-runsnakerun/ but I hang up at the last line with "python: can't open file 'runsnake.py': [Errno 2] No such file or directory "


Solution

  • The standard solution is to use cProfile (which is in the standard library) and then open the profiles in RunSnakeRun: http://www.vrplumber.com/programming/runsnakerun/

    cProfile, however only profiles at the per-functions level. If you want line by line profiling try line profiler: https://github.com/rkern/line_profiler