Changes between Version 2 and Version 3 of PageStatsMiddleware


Ignore:
Timestamp:
09/16/07 12:03:26 (8 years ago)
Author:
Poromenos
Comment:

Rolled back previous change, it broke DB queries.

Legend:

Unmodified
Added
Removed
Modified
  • PageStatsMiddleware

    v2 v3  
    2424        n = len(connection.queries)
    2525
    26         # set this back so exceptions are properly handled
    27         debug = settings.DEBUG
    28 
    2926        # time the view
    3027        start = time()
    3128        response = view_func(request, *view_args, **view_kwargs)
    3229        totTime = time() - start
    33 
    34         # and once more, to get queries
    35         settings.DEBUG = True
    3630
    3731        # compute the db time for the queries just run
     
    8276<!-- STATS: Total: %(totTime).2f Python: %(pyTime).2f DB: %(dbTime).2f Queries: %(queries)d -->
    8377}}}
     78
     79Warning: This code will make exceptions and 404 errors visible regardless of your DEBUG setting, so don't use it on production servers.
Back to Top