mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
Merge pull request #834 from AlanCoding/jump-the-start-line
This commit is contained in:
commit
07cfa6cba5
@ -43,6 +43,8 @@ class TimingMiddleware(threading.local):
|
||||
self.prof.enable()
|
||||
|
||||
def process_response(self, request, response):
|
||||
if not hasattr(self, 'start_time'): # some tools may not invoke process_request
|
||||
return response
|
||||
total_time = time.time() - self.start_time
|
||||
response['X-API-Total-Time'] = '%0.3fs' % total_time
|
||||
if settings.AWX_REQUEST_PROFILE:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user