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 ...
随机推荐
- C语言 设一个函数process,调用它时,实现不同功能。
//凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 输入a, b,第一次调用process找最大值,第二次调用process找最小值,第三次调用求和. 方法1 ...
- Cobalt Strike 服务器搭建及使用
Cobalt Strike使用中的一些坑(一) http://www.cnblogs.com/miaodaren/articles/7829793.html cobaltstrike3.8服务器搭建及 ...
- nuxt项目部署
前提: linux服务器 一.安装node ① 下载 cd /usr/local/src/ wget https://nodejs.org/dist/v10.11.0/node-v10.11.0-l ...
- 数据合并处理concat
var data = [ {name: '海门', value: 9}, {name: '鄂尔多斯', value: 12}, {name: '招远', value: 12}, {name: '舟山' ...
- vuejs2+webpack2+vuxui2多页面架手脚,支持二级目录
const UglifyJsPlugin = require('uglifyjs-webpack-plugin') // 去console插件 const CompressionWebpackPlug ...
- SQLite的文件锁、并发与pager---(SQLite学习手册(锁和并发控制))
一.概述: 在SQLite中,锁和并发控制机制都是由pager_module模块负责处理的,如ACID(Atomic, Consistent, Isolated, and Durable).在含有数据 ...
- No such property: FOR_RUNTIME for class: org.gradle.api.attributes.Usage
自从Android studio升级到3.1版本,谷歌又折腾出让你意想不到的错误.... 从github上下了个项目用来学习,却出现了如下错误: No such property: FOR_RUNTI ...
- lightoj-1128-Greatest Parent(二分+LCA)
传送门 首先我要实力吐槽这个lightoj 它给我的注册密码藏在不为人所见的地方 注册注册了10多分钟 qwq -------------------------------------------- ...
- 洛谷 P1451 求细胞数量
题目链接 https://www.luogu.org/problemnew/show/P1451 题目描述 一矩形阵列由数字0到9组成,数字1到9代表细胞,细胞的定义为沿细胞数字上下左右若还是细胞数字 ...
- Unity热更新学习(二) —— ToLua c#与lua的相互调用
tolua 下载地址:http://www.ulua.org/index.html c#调用lua的方法,tolua的官方例子提供了很多种.我初步学了一种在做项目使用的方法.通过DoFile方法执行l ...