What tools should be used to profile Python code in window 7

I want to profile python code on Widnows 7. I would like to use something more user-friendly than the original cProfile dump. In this search, I found the RunSnakeRun GUI, but I cannot find a way to download RunSnakeRun on Windows. Can I use RunSnakeRun on Windows or what other tools can I use?

Edit: Now I installed RunSnakeRun. This progress, thanks guys. How to run it without linux command line?

Edit 2: I am using this tutorial http://sullivanmatas.wordpress.com/2013/02/03/profiling-python-scripts-with-runsnakerun/ , but I hung up on the last line using "python: cannot open file" runnake.py ": [Errno 2] There is no such file or directory"

+4
source share
2 answers

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 level of each function. If you want line-by-line profiling to be done by line-profiler: https://github.com/rkern/line_profiler

+2
source

I installed runnake after these installation instructions .

The python runsnake.py profile.pfl step python runsnake.py profile.pfl could not be completed because the installation step ( easy_install SquareMap RunSnakeRun ) did not create the runsnake.py file.

For me (on Ubuntu), the installation step created an executable in /usr/local/bin/runsnake . I realized this by reading the console output from the installation phase. It may be located elsewhere on Windows, but it should be printed on the output of easy_install . To read the profile file, I can execute /usr/local/bin/runsnake profile.pfl .

+1
source

Source: https://habr.com/ru/post/1492756/


All Articles