Gatling user injection constantUsersPerSec

百般思念 提交于 2020-07-20 14:01:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!