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

Feature request: Stepped hatch rate #168

Closed
MattFisher opened this issue Jun 25, 2014 · 7 comments
Closed

Feature request: Stepped hatch rate #168

MattFisher opened this issue Jun 25, 2014 · 7 comments

Comments

@MattFisher
Copy link
Contributor

With a constantly increasing load due to a constant hatch rate, the server doesn't have time to steady-state and produce stable statistics.

I would love to be able to specify a locust population that:

  • increases to a certain level (at the specified hatch rate),
  • remains at that level for a specified time,
  • increases to the next level,
  • remains at that level for a specified time,
  • and so on until the specified population is reached.

I think you would need two more parameters, in addition to hatch rate and number of locusts: population_step and time_between_steps.

It would make the population grow like this:

|            _________   _
|        ___/            _|  population step
|    ___/
|___/_______________

     |__| time between steps

Instead of like this:

|      __________
|     /
|    /
|___/____________
@Jahaja
Copy link
Member

Jahaja commented Jul 12, 2014

Hi Matt,

With a constantly increasing load due to a constant hatch rate, the server doesn't have time to steady-state and produce stable statistics.

This is the reason why Locust will reset the statistics after the hatching phase is completed. I'm not sure why stepped hatching would make any difference in this regard.

@MattFisher
Copy link
Contributor Author

I would like to be able to set up a test run that will gradually increase
load until the server hits its limits.
At the moment, finding the maximum capacity of the server takes multiple
sequential test runs with different numbers of locusts.
Stepped hatching would allow a single test run to provide multiple loads in
a single unattended test, sequentially, with time for the server to
steady-state in-between.
For reference, I'm using New Relic to monitor the results so I'm not
focussed on extracting the statistics from Locust.

On 12 July 2014 23:59, Joakim Hamrén [email protected] wrote:

Hi Matt,

With a constantly increasing load due to a constant hatch rate, the server
doesn't have time to steady-state and produce stable statistics.

This is the reason why Locust will reset the statistics after the hatching
phase is completed. I'm not sure why stepped hatching would make any
difference in this regard.


Reply to this email directly or view it on GitHub
#168 (comment).

@sanga
Copy link
Contributor

sanga commented Jul 14, 2014

There was a 'ramping' plugin in locust some time ago (that was removed) that tried to do more or less what you described (if I understand correctly), by looking at the response times - that could be updated to current master. But if you'd rather use some other metrics (NewRelic metrics) that describe the load on your system, there's nothing to stop you writing a script that would:

a) call locust http api to add load
b) wait a bit and then check the load (or whatever metric you're interested in) on your system
c) goto a) - if the system can still handle more load

@spearsem
Copy link

@justiniso Can this be re-opened?

I am also curious about how to provide a fractional hatch rate, so that fewer than 1 VU is hatched per second (often, much fewer, like maybe 5 new VUs spread out over 1 minute).

You can see, e.g. in bzt, that concurrency divided by the ramp-up time is always interpreted as a hatch rate, and the math.ceil means it cannot be less than 1.

@vladbeza
Copy link

I am interested if someone found answer or some workaround for this feature. It would be useful

@vladbeza
Copy link

Found out that hatch rate may be set to float value so to get one user per 10 sec hatch rate 0.1 can be set. Maybe it will be helpful for somebody

@rqton
Copy link

rqton commented Oct 24, 2019

Hey guys i'm also very intrested by this feature request. This allows you to create more realistic tests
Can we re-open it ?

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

No branches or pull requests

7 participants