Scenarios throughput configuration

Hello,
I’m currently a jmeter user and looking forward to rewrite some tests using Gatling.
First issue I faced is absence of scenarios throughput control (like constant throughput timer in jmeter). Manual pause doesn’t fit my requirement as I need ability to configure throughput i. e. for scalability tests and I can not just multiply or divide pause value as execution time may be non linear for different scenarios.

Didn’t find any description of this feature in docs or on the internet - is there one? If not can it be implemented in Gatling?

Hi,

It’s implemented in master and will be shipped in next Gatling 2 milestone.

If you want to give it a try, you can grab a snapshot here: https://oss.sonatype.org/content/repositories/snapshots/io/gatling/highcharts/gatling-charts-highcharts/2.0.0-SNAPSHOT/

It’s called throttling, and here’s what it looks like: https://github.com/excilys/gatling/blob/master/gatling-bundle/src/test/scala/io/gatling/bundle/test/HTTPCompileTest.scala#L234

Thx, will try

i tried like this

setUp(scn.inject(rampUsers(500).over(2 minutes))
.throttle(jumpToRps(20), reachRps(100) in (120 seconds), holdFor(1200 seconds)))
.pauses(uniformPausesPlusOrMinusPercentage(1))
.disablePauses
.constantPauses
.exponentialPauses
.uniformPauses(1.5)
.uniformPauses(1337 seconds)

but rps always jumped to 140 or higher very quickly. and seems like the pauses i added in groups stopped working. i guess .disablePauses made the trick.

any ideas? i made something wrong? i grabbed the latest snapshot version btw.

Thanks!

在 2014年1月14日星期二UTC-8上午3时26分25秒,fedos…@gmail.com写道:

even i removed all the pause stuff, the result is still the same. wrong way of using it?

在 2014年1月14日星期二UTC-8上午3时23分52秒,Stéphane Landelle写道:

Nope, probably a bug. Investigating.

Should be better now.

However, when I developed the thing, it made sense to me to automatically disable pauses when using throttling.

Opinion?

i grabbed the latest snapshot version but still my throughput jumped to 200 immediately.

setUp(scn.inject(rampUsers(500).over(2 minutes))
.throttle(jumpToRps(20), reachRps(100) in (120 seconds), holdFor(1200 seconds)))
.protocols(httpConf)

disable all pauses in script makes sense to me since the throttle module will add pauses based on rps target. can i get a sample how you are using it? it is possible that i used it in a wrong way.

Thanks

在 2014年1月23日星期四UTC-8上午2时27分05秒,Stéphane Landelle写道:

from what i observed, the pauses i added into the script stopped working so this is expected. but the new pauses that should be added by throttle are not working, i guess?

在 2014年1月23日星期四UTC-8上午10时12分36秒,Kan Wu写道:

Here it my test: https://gist.github.com/slandelle/8588606

i think i know why now. i used this one as the sample to write: https://github.com/excilys/gatling/blob/master/gatling-bundle/src/test/scala/io/gatling/bundle/test/HTTPCompileTest.scala.

in that code, .throttle is part of inject.

in your test, .throttle is out of setUp. now it works fine.

Thanks a lot for your help!

在 2014年1月23日星期四UTC-8下午3时05分27秒,Stéphane Landelle写道:

Do you have several populations in your simulation?
If you define throttle on a population, you only throttle it and don’t affect the other ones.

what do you mean by populations? i think i only have one population if you mean scenario. this is the old code, which does not work:

setUp(scn.inject(rampUsers(Properties.sessions).over(Properties.rampUp minutes))
.throttle(jumpToRps(20), holdFor(5 seconds), reachRps(100) in (20 seconds), holdFor(1200 seconds)))
.protocols(httpConf)

This is the new code that works fine:

setUp(scn.inject(rampUsers(Properties.sessions).over(Properties.rampUp minutes)))
.throttle(jumpToRps(20), holdFor(10 seconds), reachRps(100) in (20 seconds), holdFor(1200 seconds))
.protocols(httpConf)

be careful about the bracket location, that made the trick.

在 2014年1月23日星期四UTC-8下午3时17分03秒,Stéphane Landelle写道:

what do you mean by populations? i think i only have one population if you
mean scenario.

Yep, that's what I mean.

this is the old code, which does not work:

setUp(scn.inject(rampUsers(Properties.sessions).over(Properties.rampUp
minutes))
.throttle(jumpToRps(20), holdFor(5 seconds), reachRps(100) in (20
seconds), holdFor(1200 seconds)))
.protocols(httpConf)

This is the new code that works fine:

setUp(scn.inject(rampUsers(Properties.sessions).over(Properties.rampUp
minutes)))
.throttle(jumpToRps(20), holdFor(10 seconds), reachRps(100) in (20
seconds), holdFor(1200 seconds))
.protocols(httpConf)

be careful about the bracket location, that made the trick.

So that's a bug...
If you have only one population, setting the throttling globally or on the
population should produce the same result. Will investigate.
Thanks for your feedback.

Hi,

Came across this post and was wondering where it stands…? :slight_smile:
I’m also in need to control throttling per scenario, and not per simulation.

Thanks

Hi,

It has been implemented for quite a long time, and documented too :wink:
http://gatling.io/docs/2.0.0-RC5/general/scenario.html?highlight=throttling#throttling

Hi Amit,

The constant throughput timer in JMeter determines the constant throughput per second.

I achieve this in Gatling by using the inject method:
https://github.com/gatling/gatling/blob/master/src/sphinx/general/simulation_setup.rst#injection

Aidy