我应该如何计算 Ramp-up period

How should I calculate Ramp-up-period

有很多可用的答案,但我很困惑,因为 Jmeter 并没有完全产生我所期望的结果

测试用例:想要 运行 测试总时长 20 分钟。吞吐量为 30 request/second.

我有两组具有以下线程属性的线程组:


Overall Constants Throughput timer : 1800 samples / minutes ( which is 30 request per second)

Thread group -1
Number of users : 150 users
ramp up period = 5 (Not sure what to keep here, 150 users/ 30 (request/sec) = 5)
loop count : infinite
scheduler ; lifetime = 1200 seconds (20 minutes)

Thread group -2
Number of users : 150 users
ramp up period = 5 (Not sure what to keep here, 150 users/ 30 (request/sec) = 5)
loop count : infinite
scheduler ; lifetime = 1200 seconds (20 minutes)

但是当我运行 Jmeter时,总结报告中的吞吐量高于100 request/sec

我分配的线程设置值有问题吗?

编辑:总的来说,我的意思是所有线程组的级别相同

我不确定“总体常量吞吐量计时器”是什么意思,也不清楚您将什么用作“基于计算吞吐量”。如果您有与线程组相同级别的恒定吞吐量计时器 - 您需要选择 all active threads (shared)

如果您有 2 个具有默认设置的独立计时器 - 将吞吐量除以 2。

您可能会发现 Precise Throughput Timer easier to use or if you don't mind using JMeter Plugins there is Throughput Shaping Timer 它提供了根据每秒请求数定义工作负载模式的简便方法