百度上这方面资料很少,google上有一些,我试着总结一下。
Precise Throughput Timer 是Jmeter4.0添加的新功能,直接摘录一段英文:
The Precise Throughput Timer is a timer that enables users to determine the throughput (samplers per second/minute/hour/etc.) they want to run in their tests. Compared to the Constant Throughput Timer, the user is more flexible when deciding how to spread out the samples over time. In addition, execution is scheduled in a random way, enabling a constant load to build up. Finally, this timer uses the Poisson arrival schedule for its pauses, making it close to real-life scenarios.
(不是翻译,就是说 Precise Throughput Timer 能让使用者控制吞吐量更灵活(每小时每分钟每秒等),并且如果定制了如一秒执行100次,那么这100次该如何分布(产生定制的恒定吞吐量的泊松分布(Poisson Distribution,二项式的随机概率分布)),是更棒的算法来实现随机分布,更接近实际情况。)
下面是一个例子:
Add a Precise Throughput Timer (Thread Group->Add->Timers->) .We have to achieve 100 requests by 5 users in 300 second. Setup the timers as per below setting:
a. Target throughout = 100
b.Throughput period (Seconds) = 300 (Total time to achieve the desired throughput).
c.Number of threads in the batch (threads)= 1
d.Use approximate throughput when sequence length exceeds (samples) = 100 (total no of requests)
e. Allowed throughput surplus (Percents) = 10
(不是翻译,这个例子就是说,300秒内,会执行100次请求,那么每秒是 100/300 就是0.3333的 throughput。)
(注意Throughput period (Seconds) 不能小于5,要不然会报错(Jmeter4.0版本))
来源:oschina
链接:https://my.oschina.net/u/4355290/blog/3292004