Changes between Version 15 and Version 16 of ProfilingDjango


Ignore:
Timestamp:
Apr 10, 2014, 6:25:37 PM (10 years ago)
Author:
CarsonGregory
Comment:

Cleanup grammar

Legend:

Unmodified
Added
Removed
Modified
  • ProfilingDjango

    v15 v16  
    33== Profiling Specific Code ==
    44
    5 Python has several profiling modules, the least worst of which is the apparently unmaintained [http://docs.python.org/library/hotshot.html hotshot]. It's better than the Profiler module for our purposes as it has simple 'start' and 'stop' methods, as well as a method that takes a callable and it's arguments.
     5Python has several profiling modules, the least worst of which is the apparently unmaintained [http://docs.python.org/library/hotshot.html hotshot]. It's better than the Profiler module for our purposes as it has simple 'start' and 'stop' methods, as well as a method that takes a callable and its arguments.
    66
    77I wrap views and other callables I want to examine in a decorator like this one:
     
    6464}}}
    6565
    66 This will produces files of the form `/path/to/logs/my_view-20100211T170321.prof`, so you can test your view under various input conditions and compare the results.
     66This produces files of the form `/path/to/logs/my_view-20100211T170321.prof`, so you can test your view under various input conditions and compare the results.
    6767
    6868To actually examine the results, you'll need to use the `hotshot.stats` module. A simple script like this:
Back to Top