-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Make wait_time default to zero (vote up/down for this ticket please :) #1308
Comments
I'm currently voting down, and my reasoning is this that Locust's main philosophy has been that it's User-centered and not RPS-centered. For me, that is the power of Locust and what sets it apart from many other tools. That one declare real user-behaviour in code and chooses how many users to simulate, as opposed to choosing a number of RPS. With that mindset I don't think it makes sense to have a default of |
Sorry, but I'll have to vote down for this, for a couple of reasons:
Just my 2 cents. |
Thanks for your input!
I dont expect to convince anyone but these are my main arguments :) |
Do we think there is a documentation issue? Could we consider making a subclassed version of a locust/http client, in core/contrib, such that it comes loaded with the I ran into a similar issue recently as I've recently reintroduced locust into our load test project this week. I did understand what a locust was (a user), but I had a mismatch in my mind about how often a given set of APIs would be hit by the user/locust. Low wait time is still great to test! It's an excellent test, but agreed, if there is a polling API in your service/system for instance it likely isn't going to be hit every second or so (or less) by that specific user (locust), but instead more likely being hit every few (or even dozen) seconds, depending on many factors on a particular project of course. |
That's one of my reasons for not wanting to make this change. It's sooo easy to just make a subclass in your own testscript, or even just a mixin class, if you want that behaviour: class NoWaitTime:
wait_time = constant(0)
class SuperDuperFastUser(NoWaitTime, User):
@task
def t(self):
print("yay") With the current implementation there's a risk that people forget to declare a |
… to specify it. Makes a big difference in readability of small User classes and reduces the cognitive overhead for locust beginners. Fixes #1308
Today all Locust classes need to have a wait_time specified. I suggest we change that to make no wait time the default. I think having no wait time is what a reasonable user would expect, and it significantly lowers the bar for new locust users.
Please vote up or down (or add any arguments you may have).
This would change the simplest possible locust file from:
To:
The text was updated successfully, but these errors were encountered: