Simulate Mulitple User Scenario to benchmark server

Hi,

I have started using gatling for benchmarking my webapp server and would like to simulate the following scenario :

  1. Load test the scenario with 1 user for 3 minutes
  2. Break/Sleep of 1 minute
  3. Load test the same scenario with 2 users for 3 minutes
  4. Break/Sleep of 1 minute
  5. … Continue till 20 users

I read some threads in this regards in the group and I think the way to get this done ( after reading the threads ) is as follows :

My scenario :

val scn = scenario(“Load test PDP”)
.loop(
chain
.feed(csv(“urls.csv”).random)
.exec(
http(“request_1”)
.get("${uri}")
.check(status.is(200)))
).during(3,MINUTES)

for (i ← 1 to 20) yield scn.configure.users(i).ramp(1,MINUTES).delay((i * 4), MINUTES).protocolConfig(httpConf)

I tried running the scenerio and the output that I get on console is confusing me

For example :

2013-02-27 09:53:48 1221s elapsed
---- Load test PDP -------------------------------------------------------------
Users : [################################------- ] 50%
waiting:8 / running:2 / done:10
---- Requests -----------------------------------------------------------------

What does “waiting” , “running” and “done” mean ? Sometimes waiting takes negative values .

Please let me know if I doing something wrong ?

Cheers
Sharad

Hi,

This sample is a bit old. What happens is that scenario names currently have to be unique (we’ll be working on a proper solution for your use case in Gatling 2: https://github.com/excilys/gatling/issues/693).

You have to turn your scenario from a val to a def (a method).

def scn(i: Int) = scenario(“Load test PDP” + i)…

for (i ← 1 to 20) yield scn(i).configure.users(i).ramp(1,MINUTES).delay((i * 4), MINUTES).protocolConfig(httpConf)

Cheers,

Stéphane

Thanks Stephane for the quick reply. I have converted that from a val to a def as you said and it seems fine now .

Cheers
Sharad

Glad to hear.
I see room for improvement here, I’ll if I can make it can work as you expected.

Have fun,

Stéphane

FYI, I’ve opened an issue for further investigation: https://github.com/excilys/gatling/issues/989

Cheers,

Stéphane