Changes between Version 1 and Version 2 of PageStatsMiddleware
- Timestamp:
- Sep 1, 2007, 2:05:26 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PageStatsMiddleware
v1 v2 24 24 n = len(connection.queries) 25 25 26 # set this back so exceptions are properly handled 27 debug = settings.DEBUG 28 26 29 # time the view 27 30 start = time() 28 31 response = view_func(request, *view_args, **view_kwargs) 29 32 totTime = time() - start 33 34 # and once more, to get queries 35 settings.DEBUG = True 30 36 31 37 # compute the db time for the queries just run … … 40 46 pyTime = totTime - dbTime 41 47 42 # restore debugging setting 48 # restore debugging setting again 43 49 settings.DEBUG = debug 44 50