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

Bring back the -n parameter for number of requests #1593

Closed
joaonc opened this issue Oct 14, 2020 · 4 comments
Closed

Bring back the -n parameter for number of requests #1593

joaonc opened this issue Oct 14, 2020 · 4 comments

Comments

@joaonc
Copy link

joaonc commented Oct 14, 2020

One type of load tests we're doing is: With our current environment, we want to see how long it takes to execute N number of requests to then determine if that's acceptable or not.

That N is rather large and needs to be somewhat precise. I want to be able to kick that off in AWS (or in my computer overnight) and when the test reaches N requests it stops.

I'd like to avoid these things:

  1. Extrapolation: Instead of N requests, do N/10 and just multiply by 10 afterwards to figure out the time.
    We track mem/cpu/io etc. and with lesser numbers some of the issues we're testing for may not come up.
  2. Watch the tests: Basically look at the number of requests and stop when it reaches N. We need this to be a script that runs automated, yet want the locust reports as well 😉
  3. Set time: Instead of using -n, use -t and try and come up with a time that will allow the tests to reach N requests. This doesn't take into account that system performance may degrade over time and load and the time set won't allow to reach N.

This was a feature that existed in early versions of locust (before the -t option was introduced) and I think I've seen other tickets being filed asking for it to come back, but apparently that didn't happen..

Would love for you to consider implementing the -n --num-requests feature (either XOR -t or whichever happens first when both are set) as there are valid use cases for it and seems like it's not too hard to do, since this was part of Locust at one point.

@joaonc joaonc changed the title Feature request: bring back the -n parameter for number of requests Bring back the -n parameter for number of requests Oct 14, 2020
@joaonc
Copy link
Author

joaonc commented Oct 14, 2020

This is mentioned in #1048 but I think there's no need to pick one model (time) over the other (number of requests). Why not have both?

@cyberw
Copy link
Collaborator

cyberw commented Oct 15, 2020

Duplicate of #1085

If you use locust-plugins you can use the -i parameter mentioned there.

@joaonc
Copy link
Author

joaonc commented Oct 15, 2020

Oh, snap. There's a thing called locust-plugins that adds commonly used functionality to Locust !?! Been using Locust for some time now and this is the first time hearing of this 😮

Suggest making locust-plugins much more prominent in Locust's documentation. Searched for it and it's tucked away in a corner somehwere.. wouldn't find it if I wasn't searching for it.

Tx for the pointer @cyberw !

@joaonc joaonc closed this as completed Oct 15, 2020
@joaonc
Copy link
Author

joaonc commented Oct 15, 2020

Also didn't know about locust-swarm, which I just noticed in locust-plugins's documentation.

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