locustio / locust

Write scalable load tests in plain Python 🚗💨
https://locust.cloud
MIT License
25.06k stars 3k forks source link

Locust --processes argument generating multiple html reports #2639

Closed Hchanni closed 8 months ago

Hchanni commented 8 months ago

Prerequisites

Description

I'm running Locust in a docker container with the command within ECS, and it works well, I push the html report contents to S3, but for some reason, it's providing me with 5 files instead of just one. It seems that I'm getting a file for each worker, and then the master aswell.

Command line

locust -f ./locustfile.py --headless --processes 4 --users 150 --spwan-rate 150 --run-time 15s --host --html /tmp/report.html

Locustfile contents

Just a very basic hello world api endpoint.

Python version

3.11

Locust version

Locust docker image 2.24.0

Operating system

Linux

cyberw commented 8 months ago

Interesting. Is it not the same if you launch worker processes individually?

Hchanni commented 8 months ago

Interesting. Is it not the same if you launch worker processes individually?

When you mean launch worker processes individually do you mean in it's own seperate ECS task?

It's really weird because I run the Locust script through direct Github Actions with the html report essentially the exact same command above, and I only get one html report.

I also have run a distributed environment where worker tasks run in a separate ECS environment, and that runs with the UI and I can download the one specific HTML script.

cyberw commented 8 months ago

Interesting. Is it not the same if you launch worker processes individually?

When you mean launch worker processes individually do you mean in it's own seperate ECS task?

I mean by running locust … --worker 4 times instead of using --processes. I dont know that much about ecs tasks :) maybe run locally on your own machine first to remove it from the equation.

It's really weird because I run the Locust script through direct Github Actions with the html report essentially the exact same command above, and I only get one html report.

Weird indeed…

Hchanni commented 8 months ago

I've decided to go the distributed way of using --expect_workers and then spawning up multiple workers.