zoukankan      html  css  js  c++  java
  • Jmeter Constant Throughput Timer 使用

     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不能达到预期目标。

  • 相关阅读:
    福州KTV
    MSN登陆不上:微软谴责中国的“技术问题”
    DB2 存储过程开发最佳实践
    在DB2存储过程中返回一个数据集
    Host is not allowed to connect to this MySQL server 解决方案
    CentOS安装中文支持
    ImportError: libpq.so.5: cannot open shared object file: No such file or directory
    CentOS 终端显示中文异常解决办法
    pytestDemo
    python 获取当前运行的类名函数名
  • 原文地址:https://www.cnblogs.com/onmyway20xx/p/4195177.html
Copyright © 2011-2022 走看看