Ярлыки

воскресенье, 16 марта 2014 г.

pycallgraph

You may import pycallgraph as a module and run the trace graph within your application.
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')
The default is to output in png with with the dot tool. You can change them by specifying arguments:
pycallgraph.make_dot_graph('test.jpg', format='jpg', tool='neato')

Комментариев нет:

Отправить комментарий