问题
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?
回答1:
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.
回答2:
Gatling don't round rate Double. You can use rate like 0.33 freely.
来源:https://stackoverflow.com/questions/32355372/gatling-user-injection-constantuserspersec