我正在检查一个scala代码以收集它们在20秒钟内注入事务的位置。
/*TPS = Transaction Per Second */
val minTps = Integer.parseInt(System.getProperty("minTps", "1"))
val maxTps = Integer.parseInt(System.getProperty("maxTps", "5"))
var rampUsersDurationInMinutes =Integer.parseInt(System.getProperty("rampUsersDurationInMinutes", "20"))
setUp(scn.inject(
rampUsersPerSec(minTps) to maxTps during (rampUsersDurationInMinutes seconds)).protocols(tcilProtocol))
Run Code Online (Sandbox Code Playgroud)
有人问了同样的问题,rampUsersPerSec函数实际上是做什么的?但从未回答。我认为理想情况下,图表应看起来像这样。
您能否确认我是否正确理解了 rampUsersPerSec?
结果表明请求数确实为60。我的计算正确吗?
---- Global Information --------------------------------------------------------
> request count 60 (OK=38 KO=22 )
> min response time 2569 (OK=2569 KO=60080 )
> max response time 61980 (OK=61980 KO=61770 )
> mean response time 42888 (OK=32411 KO=60985 )
> std deviation 20365 (OK=18850 KO=505 )
> response time 50th percentile 51666 (OK=32143 KO=61026 )
> response time 75th percentile 60903 (OK=48508 KO=61371 )
> response time 95th percentile 61775 (OK=61886 KO=61725 )
> response time 99th percentile 61974 (OK=61976 KO=61762 )
> mean requests/sec 0.741 (OK=0.469 KO=0.272 )
---- Response Time Distribution ------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
rampUsersPerSec是开放式工作负载模型注入,您可以在其中指定用户启动方案的速率。在加特林的文件说,这种注射分布图
在给定的持续时间内,将用户从起始速率注入到目标速率(以每秒用户数为单位)。用户将定期注入
因此,尽管我不确定您提供的示例是否正确无误,因为加特林机使用的是“常规间隔”(可能是更平滑的模型),所以您或多或少是正确的。您指定一个起始速率和一个最终速率,加特林系统计算出您持续时间内的所有中间注入速率。
请注意,这与模拟将生成的并发用户数无关,这取决于到达率(由您控制)和执行时间(不受控制)的函数
| 归档时间: |
|
| 查看次数: |
731 次 |
| 最近记录: |