I am using locust to run load test. Specifically I am trying to use docker-compose
and following the documentation at https://docs.locust.io/en/stable/running-locust-docker.html
I want to retrive test stats in CSV format per the directions in https://docs.locust.io/en/stable/retrieving-stats.html
Now when running this setup headless
how can I get aggregated results in CSV format from all workers? The non headless version allows me to download the aggregated, results as a CSV, but am not sure of the headless version would work here.
Thanks!
You should only have to worry about running --headless --csv=example
(as noted from the docs page you linked to) and such on the master. The workers don't need those as headless
only applies to the master and they don't aggregate their own results. The CSVs generated by the master should contain all the results from all the workers. If you've tried this and you're not seeing all the data you're wanting, you may want to try adding --csv-full-history
.
From the docs page:
The files will be named example_stats.csv, example_failures.csv and example_history.csv (when using --csv=example). The first two files will contain the stats and failures for the whole test run, with a row for every stats entry (URL endpoint) and an aggregated row. The example_history.csv will get new rows with the current (10 seconds sliding window) stats appended during the whole test run. By default only the Aggregate row is appended regularly to the history stats, but if Locust is started with the --csv-full-history flag, a row for each stats entry (and the Aggregate) is appended every time the stats are written (once every 2 seconds by default).