Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the data in the csv be statistically averaged according to the current number of users, rather than the average from the start of the pressure test to the present? #2718

Closed
2 tasks done
GeraldWhitehead opened this issue May 21, 2024 · 11 comments

Comments

@GeraldWhitehead
Copy link

Prerequisites

Description

Hi, our company is developing a pressure testing platform, the underlying use is locust, this library is very great!
Now I have a question, I don't know if there is this configuration, is when I use the ladder for pressure testing, for example, the number of users is 6000, 7000, 8000, 9000, 10000, when the number of users is 7000, I will go to download csv once. when the number of users is 8000, I will go to download csv once again, and so on and so forth. But I realized that the data in the downloaded csv is averaged from the beginning of the pressure test to the time of download. What I want is, for example, if I go to download when I reach 8000 users, it should be the data during the process from 7000 users to the end of 7000 users. Is there a parameter to configure this, I can't find it in the documentation.
image
image
So I think csv should count the qps of the user at each stage, not the average from the beginning to the present.

@cyberw
Copy link
Collaborator

cyberw commented May 21, 2024

Hi!

Have you tried using this parameter:

--reset-stats Reset statistics once spawning has been completed. Should be set on both master and workers when running in distributed mode

@GeraldWhitehead
Copy link
Author

Hi!

Have you tried using this parameter:

--reset-stats Reset statistics once spawning has been completed. Should be set on both master and workers when running in distributed mode

Thanks, perfect solution to my problem!

@GeraldWhitehead
Copy link
Author

Hi, I found that after adding the --reset-stats parameter, the downloaded csv data is what I want, but after the end of the pressure test, I also go to download the html report, but the downloaded report only has the last data. All previous data is cleared. This is because I have integrated locust into the pressure testing platform. It will automatically download the csv and html reports for comparing the results at a later stage. How can I keep the full report?

image
But the report I ended up downloading only had 10 users
image
Where can I set this up? With the --reset-stats parameter, the downloaded html report is complete.

@GeraldWhitehead
Copy link
Author

I'm using locust version 2.28.0.

@cyberw
Copy link
Collaborator

cyberw commented May 23, 2024

I think you should just run locust 3 times to get the desired result.

@GeraldWhitehead
Copy link
Author

I think you should just run locust 3 times to get the desired result.

I'm going to run a ladder test, and if I run it three times individually, then StagesShape is useless and cumbersome, and doesn't automatically increase the number of users

@cyberw
Copy link
Collaborator

cyberw commented May 23, 2024

I'm sorry that it is not to your liking. But LoadShapes are just a way of controlling the user count over time. Stages in LoadShapes is not really a native locust feature, so getting separate results for separate stages is not possible.

I dont quite understand what you mean by this and why you can't just run multiple tests:

This is because I have integrated locust into the pressure testing platform

What is a pressure testing platform?

@GeraldWhitehead
Copy link
Author

I'm sorry that it is not to your liking. But LoadShapes are just a way of controlling the user count over time. Stages in LoadShapes is not really a native locust feature, so getting separate results for separate stages is not possible.

I dont quite understand what you mean by this and why you can't just run multiple tests:

This is because I have integrated locust into the pressure testing platform

What is a pressure testing platform?
On the front-end page, input the request header, request body and other data, assembled into a process, and finally generated locustfile, let locust to execute, as follows, the number in the input box is the weight of the task. Finally, generate locustfile for the enabled interfaces and let locustfile execute them. The platform automatically collects the pressure test results and compares them later.
image
Automatic collection of reports
image
Report Comparison
image
Now with the --reset-stats parameter, only the last user's data can be collected, nothing else. Is it possible to keep the full html report with other settings?

@GeraldWhitehead
Copy link
Author

I dont quite understand what you mean by this and why you can't just run multiple tests:

When stress testing, it is common to increase the number of users, e.g. 100, 200, 300, 400, 500.I set this up by class StagesShape(LoadTestShape): so that I only have to run locust once. If I don't use StagesShape(LoadTestShape), then I have to run it five times with 100, 200, 300, 400, 500 users, which increases the workload considerably, and if I go from 100 to 5,000 users, then I have to run it 50 times.

After a few releases, I'm running 100, 200, 300, 400, 500 users and comparing it to the previous data to find out if the performance of the new version is up or down and at which number of users the performance is best

@cyberw
Copy link
Collaborator

cyberw commented May 23, 2024

What is the name of the tool that you have screenshots from? It looks interesting!

Anyways, I dont think providing multiple results from a single locust run is the right way to go. That's not how the stats in locust are organized, and supporting that would require a significant amount of changes. Maybe you can automate running locust multiple times with different configuration?

@GeraldWhitehead
Copy link
Author

What is the name of the tool that you have screenshots from? It looks interesting!

Anyways, I dont think providing multiple results from a single locust run is the right way to go. That's not how the stats in locust are organized, and supporting that would require a significant amount of changes. Maybe you can automate running locust multiple times with different configuration?

Screenshot Tools: Snipaste
I'll try to see if there's another way to get the data I want, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants