Profiling using pycallgraph
Extract pycallgraph-0.5.1.zip and then hop into the directory and run:
python setup.py install
Just before your first line of code you want to graph, put in the following code:
import pycallgraph
pycallgraph.start_trace()
To stop the trace and generate the graph, put in the following code (usually at the end of your program):
pycallgraph.make_dot_graph('test.png')
http://pycallgraph.slowchop.com/pycallgraph/wiki/documentation/0.5.1















