Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Janczara committed Sep 22, 2023
1 parent 3d262e3 commit 59d9112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions locust/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions locust/contrib/fasthttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 59d9112

Please sign in to comment.