RunSnakeRun

RunSnakeRun is a small GUI utility that allows you to view (Python) cProfile or Profile profiler dumps in a sortable GUI view.  It allows you to explore the profiler information using a "square map" visualization or sortable tables of data.

Features

RunSnakeRun is a simple program, it doesn't provide all the bells-and-whistles of a program like KCacheGrind, it's intended to allow for profiling your Python programs, and just your Python programs.  What it does provide:

Installation

If you already have Python setuptools installed (a.k.a. easy_install), you should be able to install with:

easy_install RunSnakeRun
easy_install wxPython

As shown, you will require a modern wxPython and Python installation.  We don't automatically install this with easy_install, as that can cause problems for those who have manually installed the packages or who are behind corporate firewalls.

You can manually download the package and run:

python setup.py install

to install the package.  This will setup a script named "runsnake" on Linux machines which launches the profiler.

Usage

To use cProfile to capture your application's profile data:

import cProfile
command = """reactor.run()"""
cProfile.runctx( command, globals(), locals(), filename="OpenGLContext.profile" )

To view the results of your run:

python runsnake.py OpenGLContext.profile

There will be a brief delay as the application is created and begins the loading process, then you should see something like this:

Screenshot of the application viewing a HotShot profile

Click on any column title to sort by that property within that list.  Select a record in the left-most list view to see a breakdown of that record in the right-side list views.  Choose the appropriate view on the right via the tabs.  You can resize the borders between the lists and square-map views.  You can select a package/module/function hierarchic view via the menus.  You can also toggle use of percentage displays there.

Code Access and Contributions

RunSnakeRun is reasonably stable.  I don't tend to do much work on it, as it tends to just work.  My current wish list for the project follows:

If you have an idea, feel free to check out the code and implement the new feature.  I'm certainly willing to entertain new features or bug-fix requests as well.  The code is available in bzr here:

bzr branch lp:~mcfletch/squaremap/trunk squaremap
bzr branch lp:~mcfletch/runsnakerun/trunk runsnakerun
cd runsnakerun
python setup.py develop

You can contact me directly if you'd like to contribute.

Releases/Downloads