首页 技术 正文
技术 2022年11月20日
0 收藏 962 点赞 4,043 浏览 1590 个字

百度上这方面资料很少,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版本))

  Jmeter定时器:Precise Throughput Timer使用  这里有些配置没说,因为我也无法解释的很准确,google上资料也很少。(这个timer太少人用了)我只能说是猜测:Batched  departures 这部分是批处理的线程数,我倾向于理解是计算请求随机分布的线程数,就是说随机数的计算力。Accuracy of generated delays  我理解是计算随机分布的参数,如果超过了队列,这个例子中是100个请求之后,会盈余10%。 我理解这个10%是随机数分布的一个参数,总体上还是  300/100 ,但是分布是由这个参数调整的。 所以,这个timer需要测试人对数学算法有了解了,这样才能调出来更接近实际情况的throughput。如果比如说是24小时,执行一亿次,这一亿次来个随机分布,有高峰有低谷,那这个定时器确实就不简单了。 当然性能测试工作很难这么理想化,性能测试到后期肯定是全公司通力合作的一件事,上面1天一亿次的分布,是性能测试的探索方向,关键还是在于评价标准,要不然谁知道这么分布就对,那么分布就错呢。

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,077
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,552
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,400
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,176
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,813
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,896