Actions
Django profiling » History » Revision 2
« Previous |
Revision 2/5
(diff)
| Next »
Alex V Koval, 10/16/2012 09:05 PM
h1. Django profiling
Decorator from https://code.djangoproject.com/wiki/ProfilingDjango available via DjHDGutils.profiling
Usage is simple: add @profile as a decorator for view or function you wish to profile, and find results in
/tmp or into settings.PROFILE_LOG_BASE
h2. View PNG results
gprof2dot -f pstats ~/yp/default/djyp/stones1.prof | dot -Tpng -o output.png
for a convinience I've made a shell script for myself.
h3. Package requirements (Gentoo names):
- media-gfx/graphviz
- dev-util/gprof2dot
Updated by Alex V Koval over 11 years ago · 2 revisions