How to implement specific counts of thread in Gatling

738 views
Skip to first unread message

Daria Derkach

unread,
Oct 20, 2015, 7:29:00 PM10/20/15
to Gatling User Group









Is there any possibility to setup Gatling scenario to run in specific counts of thread? For instance, I want to execute 1M requests during 1hour in 2500 threads.

And also, does each scenario (in setUp(scn.inject())) will be running in different thread? What does "thread" means in Gatling-definition - is it the same as in Java?

I found a topic, but it's not exactly what I need (in case of topic-started he needed only 3 threads, but for me - counts much bigger).

I have

val scn = scenario("Test")

    .exec(mine)

}


setUp(

    scn.inject(

        rampUsers(1000000) over (3600)

     )

).assertions(global.successfulRequests.percent.greaterThan(95))



http://stackoverflow.com/q/33226931/3628317

Stéphane LANDELLE

unread,
Oct 20, 2015, 10:16:23 PM10/20/15
to gat...@googlegroups.com
This question means that you have some background with another tool, that got you used to reason on things, like threads, that should be an implementation detail.

With Gatling, you have to reason in terms of users, injection/arrival rates, and pauses/think time. Threads are just technical resources that are no concern for you, forget about them.

Stéphane Landelle
Lead developer


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daria Derkach

unread,
Oct 21, 2015, 12:33:32 AM10/21/15
to Gatling User Group
For my case this resources concern are really critical. Customer whats to be sure, that I producing load with (for instance, exactly 250 threads, more of that - he wants to setup this number manually). 

Is it possible to maybe "extend" gatling functionality by overriding it for make this things happen? Or still will be better to use some other tool in front of gatling calls?

Thanks in advance!

Stéphane LANDELLE

unread,
Oct 21, 2015, 6:43:06 AM10/21/15
to gat...@googlegroups.com
Gatling thread usage is related to the number of cores on your machine. There's a ratio between 4 and 5.

Customer whats to be sure, that I producing load with (for instance, exactly 250 threads, more of that - he wants to setup this number manually). 

I think you keep on confusing threads (technical resources, implementation detail, not a user concern) and concurrent users.

Stéphane Landelle
Lead developer


John Arrowwood

unread,
Oct 21, 2015, 7:55:47 AM10/21/15
to Gatling User Group
When you hear your client say "thread" just translate that in your head to "concurrent user".  Because that's what they mean.  To get 2500 concurrent users, you need to set up your scenario to loop for some duration, and inject 2500 users.  That will give you what you want.
Reply all
Reply to author
Forward
0 new messages