Reputation: 141
I am running Locust performance Test against an API and I need to plot a Requests/Second vs Response time plot. I can see the req/s as a parameter in the results of the tests. Is there a Library/Class from where I can directly access this parameter ?
Upvotes: 3
Views: 1350
Reputation: 170
I think you can use the _requests.csv
and _distribution.csv
files that get generated if you pass in the --csv
flag. These contain the requests/s column as well as the response times for different percentiles and also min, max, medain and avg.
https://docs.locust.io/en/stable/retrieving-stats.html
Upvotes: 1
Reputation: 36
Have you looked at using the master report / slave report event hook (depending on where you want to log it from?
https://docs.locust.io/en/stable/api.html#locust.events.EventHook
You havent said how you want to plot it, but we use something similar to shunt the metrics into a database to report on.
Upvotes: 1