XChoopa
XChoopa

Reputation: 485

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?

Upvotes: 5

Views: 7576

Answers (2)

Joe
Joe

Reputation: 11

Gatling don't round rate Double. You can use rate like 0.33 freely.

Upvotes: 0

Stephane Landelle
Stephane Landelle

Reputation: 7038

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.

Upvotes: 4

Related Questions