|
@@ -7,10 +7,9 @@ class StopwatchMiddleware(object):
|
|
|
|
|
|
def process_response(self, request, response):
|
|
def process_response(self, request, response):
|
|
try:
|
|
try:
|
|
- time = request.stopwatch.time()
|
|
|
|
if settings.STOPWATCH_LOG:
|
|
if settings.STOPWATCH_LOG:
|
|
stat_file = open(settings.STOPWATCH_LOG, 'a')
|
|
stat_file = open(settings.STOPWATCH_LOG, 'a')
|
|
- stat_file.write("%s %s s\n" % (request.path_info, time))
|
|
|
|
|
|
+ stat_file.write("%s %s s\n" % (request.path_info, request.stopwatch.time()))
|
|
stat_file.close()
|
|
stat_file.close()
|
|
except AttributeError:
|
|
except AttributeError:
|
|
pass
|
|
pass
|