diff --git a/locust/clients.py b/locust/clients.py index bd99f4746f..9e8ae2f6a8 100644 --- a/locust/clients.py +++ b/locust/clients.py @@ -163,9 +163,7 @@ def request(self, method, url, name=None, catch_response=False, context={}, **kw else: request_meta["response_length"] = len(response.content or b"") request_meta["response_fetching_time"] = (time.perf_counter() - server_response_time) * 1000 - request_meta["response_time"] = ( - request_meta["response_waiting_time"] + request_meta["response_fetching_time"] - ) + request_meta["response_time"] = request_meta["response_waiting_time"] + request_meta["response_fetching_time"] if catch_response: return ResponseContextManager(response, request_event=self.request_event, request_meta=request_meta) diff --git a/locust/contrib/fasthttp.py b/locust/contrib/fasthttp.py index a0594effac..d2da6f6c9f 100644 --- a/locust/contrib/fasthttp.py +++ b/locust/contrib/fasthttp.py @@ -250,9 +250,7 @@ def request( # Note: This is intentionally placed after we record the content_size above, since # we'll then trigger fetching of the body (unless stream=True) request_meta["response_fetching_time"] = (time.perf_counter() - server_response_time) * 1000 - request_meta["response_time"] = ( - request_meta["response_waiting_time"] + request_meta["response_fetching_time"] - ) + request_meta["response_time"] = request_meta["response_waiting_time"] + request_meta["response_fetching_time"] if catch_response: return ResponseContextManager(response, environment=self.environment, request_meta=request_meta)