Django profiling » History » Version 1
Alex V Koval, 10/16/2012 08:49 PM
hot shot script to produce PNG
1 | 1 | Alex V Koval | h1. Django profiling |
---|---|---|---|
2 | |||
3 | Decorator from https://code.djangoproject.com/wiki/ProfilingDjango available via DjHDGutils.profiling |
||
4 | |||
5 | Usage is simple: add @profile as a decorator for view or function you wish to profile, and find results in |
||
6 | /tmp or into settings.PROFILE_LOG_BASE |
||
7 | |||
8 | h2. View PNG results |
||
9 | |||
10 | gprof2dot -f pstats ~/yp/default/djyp/stones1.prof | dot -Tpng -o output.png |
||
11 | |||
12 | for a convinience I've made a shell script for myself. |