加特林用户注入常数UsersPerSec [英] Gatling user injection constantUsersPerSec
问题描述
试图弄清楚加特林的某些功能.
Trying to figure out some feature of Gatling.
这是代码行:
setUp(myscenario.inject(constantUsersPerSec(0.33).during(90 minutes).randomized)).maxDuration(90 minutes).protocols(httpProtocol)
是否正确地说,在90分钟结束时,将有1782个(90分钟* 60秒* 0.33用户/秒)同时执行该场景的连接(或多或少由于随机方法) ),还是在90分钟内以随机间隔的总连接数为1782?
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?
推荐答案
不完全取决于它.
首先,即使当前constantUsersPerSec
取双,它实际上也被四舍五入,因此您要注入0.
First, even if constantUsersPerSec
currently takes a double, it's actually being rounded up, so you'll inject 0.
然后,并发连接数取决于给定用户的方案持续时间.假设您每秒注入1个用户,并且每个用户运行90分钟并且之前没有终止,那么您在90分钟后实际上将拥有90 * 60个打开的连接.
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.
这篇关于加特林用户注入常数UsersPerSec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!