Project

General

Profile

Actions

Django profiling

Decorator from https://code.djangoproject.com/wiki/ProfilingDjango available via DjHDGutils.profiling

Usage is simple: add @profile(‘filename’) as a decorator for view or function you wish to profile, and find results in
/tmp or into settings.PROFILE_LOG_BASE

To view, you will need to install following packages:

Generate PNG:

gprof2dot.py f pstats /yp/default/djyp/stones1.prof | dotTpng -o output.png

for a convinience I’ve made a shell script for myself.

Updated by Alex V Koval over 7 years ago · 5 revisions

Also available in: PDF HTML TXT