Skip to content

Commit

Permalink
Merge pull request #267 from dantagg/dantagg-patch-1
Browse files Browse the repository at this point in the history
changed how request_meta["method"] is set
  • Loading branch information
heyman committed Mar 28, 2015
2 parents da30bc4 + f01fcd4 commit b6ca5c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion locust/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,15 @@ def request(self, method, url, name=None, catch_response=False, **kwargs):
request_meta = {}

# set up pre_request hook for attaching meta data to the request object
request_meta["method"] = method
request_meta["start_time"] = time.time()

response = self._send_request_safe_mode(method, url, **kwargs)

# record the consumed time
request_meta["response_time"] = int((time.time() - request_meta["start_time"]) * 1000)

request_meta["method"] = response.request.method

request_meta["name"] = name or (response.history and response.history[0] or response).request.path_url

# get the length of the content, but if the argument stream is set to True, we take
Expand Down

0 comments on commit b6ca5c1

Please sign in to comment.