how to exclude some pre and post process time #2768
-
assume we have a test that includes some readers and writers |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
looks like #243 tried to do something similar, is that still the only way? it is a 9y old post. |
Beta Was this translation helpful? Give feedback.
-
Hi @testwithproduction ! There are some ways to exclude metrics, but in your case it probably makes sense to use your own http client (requests.Session instance) that doesnt log anything to locust, and instead fire request events manually. That is done using self.environment.events.request.fire(...), see https://docs.locust.io/en/stable/testing-other-systems.html for more details. If that is not clear enough, please post some of your code and I'll see if I can help you :) |
Beta Was this translation helpful? Give feedback.
-
this is the idea
|
Beta Was this translation helpful? Give feedback.
-
Which decorator are you talking about? @task? The code you posted should do exactly what you say you need, measure the response times of the http get/post, but not the redis calls. Tasks are never measured. |
Beta Was this translation helpful? Give feedback.
Which decorator are you talking about? @task?
The code you posted should do exactly what you say you need, measure the response times of the http get/post, but not the redis calls. Tasks are never measured.