Way to ramp up users by 10% each time (logarithmic growth)

Hi Gatling devs,

I was wondering if you could help me out with defining an injection that is able to reproduce this behavior.

Basically, we would like to increase the injection rate at 10% in a defined interval. For example, we would like to inject 1 user during the first 10 seconds followed by 2 which is 1+10%*1
I have looked into splitUsers() into() separatedBy() and using this in combination with constantUsersPerSecond but that did not quite work.
Then I tried using the other injection model which increased the rate from r1 to r2 during a given duration but that is not what I would like either as my growth is dependent on the previous number of users.
Wondering if there is a way to do this?

Use Excel to generate your user counts. Then do the ramp up using hand-coded intervals. It’s hack-ish but it will meet the need.

You could also do it in code, but the code is messy and involves a loop that builds the injector object. But if you really need that, then you owe it to yourself to understand Scala enough to build it…

inject takes a Iterable[InjectionStep], you can definitively build this with something like foldLeft.

You always have a really cool trick up your sleeve, don’t you? :slight_smile:

I’d love to see what that would look like, for my own edification, if you have a sec.

You know me, I’d rather teach a man how to fish :slight_smile:

Hint: Iterable.iterate(1.0, 10)(_ * 1.1)

Pretty cool…