From 8a273f90d103070e2c3d461279ac837af7f77f2e Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Sun, 16 Jun 2024 19:39:53 +0200 Subject: [PATCH] more doc updates --- locust/event.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/locust/event.py b/locust/event.py index 70f7051641..28669eeb98 100644 --- a/locust/event.py +++ b/locust/event.py @@ -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.