Skip to content

Commit

Permalink
more doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Holmberg committed Jun 16, 2024
1 parent 24f7542 commit 8a273f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions locust/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ def measure(
"""Convenience method for firing the event with automatically calculated response time and automatically marking the request as failed if an exception is raised (this is really only useful for the *request* event)
Example usage (in a task):
```
with self.environment.events.request.measure("requestType", "requestName") as request_meta:
# do the stuff you want to measure
```
You can optionally add/overwrite entries in the request_meta dict and they will be passed to the request event.
Experimental.
Expand Down

0 comments on commit 8a273f9

Please sign in to comment.