Jmeter之Constant Timer与constant throughput timer的区别(转)
当放置Constant Timer于两个http请求之间,那么它代表的含义是:在上一个请求发出至完成后,
开始Contant Timer指定的时间,最后再发出第二个请求.它并不是代表两个请求之间的发送间隔时间
图中的19.701第一个请求发出,经过1.36s时间完成接收,再等待Constant Timer的1s,再开始第二个请求
设置QPS限制
本次性能测试的需求中提到测试的目的是“了解博客的首页在负载达到20 QPS时的响应时间”,因此需要控制向博客首页发送请求的负载为20QPS。
一种可行的方法是逐步调整测试计划中的线程计算的数量以及为取样器(Sampler)添加定时器(Timer),以使HTTP取样器发出的请求的QPS保持在20个左右。
但这种方法耗时耗力,需要经过多次尝试才能达到;另一方法,完全通过设置定时器来控制QPS,一旦取样器的响应时间发生改变(网络环境发生改变),就需要重新调整定时器的等待时间。
Jmeter提供了一个非常有用的定时器,称为Constant Throughput Timer (常数吞吐量定时器),该定时器可以方便地控制给定的取样器发送请求的吞吐量。
右键点击fnng.cnblogs.com ,弹出菜单(添加--->定时器--->Constant Throughput Timer)选择Constant Throughput Timer
Constant Throughput Timer 的主要属性介绍:
名称 :定时器的名称
Target throughput(in samples per minute):目标吞吐量。注意这里是每分钟发送的请求数,因此,对应测试需求中所要求的20 QPS ,这里的值应该是1200 。
Calculate Throughput based on :有5个选项,分别是:
This thread only :控制每个线程的吞吐量,选择这种模式时,总的吞吐量为设置的 target Throughput 乘以矣线程的数量。
All active threads : 设置的target Throughput 将分配在每个活跃线程上,每个活跃线程在上一次运行结束后等待合理的时间后再次运行。活跃线程指同一时刻同时运行的线程。
All active threads in current thread group :设置的target Throughput将分配在当前线程组的每一个活跃线程上,当测试计划中只有一个线程组时,
该选项和All active threads选项的效果完全相同。
All active threads (shared ):与All active threads 的选项基本相同,唯一的区别是,每个活跃线程都会在所有活跃线程上一次运行结束后等待合理的时间后再次运行。
All cative threads in current thread group (shared ):与All active threads in current thread group 基本相同,唯一的区别是,
每个活跃线程都会在所有活跃线程的上一次运行结束后等待合理的时间后再次运行。
如上图,该元件仅作用于fnng.cnblogs.com ,设置定时器的Target throughput为1200/分钟(20 QPS),设置Calculate Throughput based on 的值为All active threads 。
当然,Constant Throughput Timer只有在线程组中的线程产生足够多的request 的情况下才有意义,因此,即使设置了Constant Throughput Timer的值,也可能由于线程组中的线程数量不够,或是定时器设置不合理等原因导致总体的QPS不能达到预期目标。
转自:https://www.cnblogs.com/111testing/p/6729551.html
Jmeter之Constant Timer与constant throughput timer的区别(转)的更多相关文章
- Jmeter Constant Throughput Timer 使用
Jmeter提供了一个非常有用的定时器,称为Constant Throughput Timer (常数吞吐量定时器),该定时器可以方便地控制给定的取样器发送请求的吞吐量. 右键点击fnng.cnblo ...
- Jmeter之Constant Timer与constant throughput timer的区别
当放置Constant Timer于两个http请求之间,那么它代表的含义是:在上一个请求发出至完成后, 开始Contant Timer指定的时间,最后再发出第二个请求.它并不是代表两个请求之间的发送 ...
- Jmeter定时器:Precise Throughput Timer使用
百度上这方面资料很少,google上有一些,我试着总结一下. Precise Throughput Timer 是Jmeter4.0添加的新功能,直接摘录一段英文: The Precise Throu ...
- Delphi - 闲来无事,自己写个Timer玩玩(多线程Timer)
明天去坐火车,回家,今天就没有事做,本来在弄一个跨进程获取其他程序里面组件,如ListView,ListBox,Button等的信息,突然有个想法自己写个Timer,不用SetTimer函数,我们自己 ...
- System.Windows.Forms.Timer、System.Timers.Timer、System.Threading.Timer的 区别和用法
System.Windows.Forms.Timer执行的时候,如果你在过程中间加一个sleep整个的界面就死掉了,但是另外两个没有这个情况,System.Timers.Timer.System.Th ...
- 定时器:Timer:System.Threading.Timer类(转)
最近的一个项目有一些地方需要用到定时功能,在设计过程中,突然发现.net的Timer类居然还有很多我以前没有用过的功能,这里就跟大家分享一下 注:这里的Timer类特指System.Threading ...
- storm定时器timer源码分析-timer.clj
storm定时器与java.util.Timer定时器比较相似.java.util.Timer定时器实际上是个线程,定时调度所拥有的TimerTasks:storm定时器也有一个线程负责调度所拥有的& ...
- System and method for controlling switching between VMM and VM using enabling value of VMM timer indicator and VMM timer value having a specified time
In one embodiment, a method includes transitioning control to a virtual machine (VM) from a virtual ...
- System.Windows.Forms.Timer、System.Timers.Timer、System.Threading.Timer的差别和分别什么时候用
System.Windows.Forms.Timer.System.Timers.Timer.System.Threading.Timer的 区别和用法http://space.itpub.net/1 ...
随机推荐
- 16.Python网络爬虫之Scrapy框架(CrawlSpider)
引入 提问:如果想要通过爬虫程序去爬取”糗百“全站数据新闻数据的话,有几种实现方法? 方法一:基于Scrapy框架中的Spider的递归爬取进行实现(Request模块递归回调parse方法). 方法 ...
- pom文件miss artifact com.sun:tools:jar:1.5.0:system问题
问题现象: 导入新的maven项目时,有时候pom.xml文件会提示一个错误信息:Missing artifact com.sun:tools:jar:1.5.0:system 问题原因: maven ...
- linux 下的启动项
/etc/profile 这个也是启动脚本.而且优先级很高哦.. 以下都是网上找来的 (1)编辑文件 /etc/rc.local 输入命令:vim /etc/rc.local 将出现类似如下的文本片 ...
- html js获取URL传参
每天学习一点点 编程PDF电子书.视频教程免费下载:http://www.shitanlife.com/code function GetQueryString(name) { var re ...
- Python学习笔记(3)-字符串
创建字符串 一对单引号或双引号 >>> 'hello world' 'hello world' >>> "hello world" 'hello ...
- Spring Security(九):2.4.4 Checking out the Source(检查来源)
Since Spring Security is an Open Source project, we’d strongly encourage you to check out the source ...
- <网络编程>套接字介绍
1.端口:IANA(Internet Assigned Numbers Authority)维护着一个端口号分配状况的清单. 众所周知的端口(0-1023):由IANA分配和控制,可能的话,相同的端口 ...
- Laravel5:重定向 redirect 函数的详细使用
Laravel5 中新增了一个函数 redirect() 来代替 Laravel4 中 Redirect::to() 来进行重定向操作.函数 redirect() 可以将用户重定向到不同的页面或动作, ...
- object detection[YOLOv2]
接着扯YOLO v2 相比较于YOLO v1,作者在之前模型上,先修修补补了一番,提出了YOLO v2模型.并基于imagenet的分类数据集和coco的对象检测数据集,提出了wordnet模型,并成 ...
- 【转】MySQL中的行级锁,表级锁,页级锁
在计算机科学中,锁是在执行多线程时用于强行限制资源访问的同步机制,即用于在并发控制中保证对互斥要求的满足. 在数据库的锁机制中介绍过,在DBMS中,可以按照锁的粒度把数据库锁分为行级锁(INNODB引 ...