mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
add hack to TimingMiddlWare for Shippable tests
This commit is contained in:
parent
2fb0144914
commit
9fb24f1a4c
@ -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