Changes between Initial Version and Version 1 of ProfilingDjango


Ignore:
Timestamp:
Apr 3, 2006, 8:32:12 AM (19 years ago)
Author:
Antti Kaihola
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ProfilingDjango

    v1 v1  
     1{{{django.core.handlers.profiler-hotshot}}} provides profiling support for Django when using mod_python. Here's a similar solution for the internal development webserver.
     2
     3Apply the included patch to {{{django/core/management.py}}} and start Django with {{{manage.py runserver}}}. Each request will create a {{{.prof}}} file in your {{{/tmp}}} directory. You can then open a Python shell and print the statistics:
     4
     5{{{
     6>>> import hotshot.stats
     7>>> stats = hotshot.stats.load("stones.prof")
     8>>> stats.strip_dirs()
     9>>> stats.sort_stats('time', 'calls')
     10>>> stats.print_stats(20)
     11}}}
Back to Top