Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gatling user injection constantUsersPerSec

Trying to figure out some feature of Gatling.

Here is the line of code:

setUp(myscenario.inject(constantUsersPerSec(0.33).during(90 minutes).randomized)).maxDuration(90 minutes).protocols(httpProtocol)

Is it correct to say that at the end of the 90 minutes, there will be 1782 (90 minutes * 60 seconds * 0.33 user per sec) connections executing the scenario at the same time (more or less due to the randomized method) or there will be 1782 total connections during the 90 minutes at a randomized interval?

like image 912
XChoopa Avatar asked Sep 27 '22 20:09

XChoopa


1 Answers

Not exactly/it depends.

First, even if constantUsersPerSec currently takes a double, it's actually being rounded up, so you'll inject 0.

Then, the number of concurrent connections depends on the scenario duration for a given user. Assuming you inject 1 user per sec and each user run for 90 mins and don't terminate before, you'll indeed have 90 * 60 open connections after 90 min.

like image 55
Stephane Landelle Avatar answered Sep 30 '22 08:09

Stephane Landelle