Skip to content

Commit

Permalink
remove accidentally added start_time parameter to request event
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed May 4, 2021
1 parent c8fca2d commit 7166fa1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion locust/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def request(self, method, url, name=None, catch_response=False, context={}, **kw
# store meta data that is used when reporting the request to locust's statistics
request_meta = {
"request_type": method,
"start_time": start_time,
"response_time": (time.monotonic() - start_time) * 1000,
"name": name or (response.history and response.history[0] or response).request.path_url,
"context": context,
Expand Down
3 changes: 1 addition & 2 deletions locust/contrib/fasthttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def request(
# store meta data that is used when reporting the request to locust's statistics
request_meta = {
"request_type": method,
"start_time": start_time,
"name": name or path,
"context": context,
"exception": None,
Expand Down Expand Up @@ -209,7 +208,7 @@ def request(
try:
request_meta["response_length"] = len(response.content or "")
except HTTPParseError as e:
request_meta["response_time"] = int((default_timer() - request_meta["start_time"]) * 1000)
request_meta["response_time"] = int((default_timer() - start_time) * 1000)
request_meta["response_length"] = 0
request_meta["exception"] = e
self.environment.events.request.fire(**request_meta)
Expand Down

0 comments on commit 7166fa1

Please sign in to comment.