如何在Jmeter中每秒触发10个请求 [英] How to fire 10 requests per second in jmeter

查看:2435
本文介绍了如何在Jmeter中每秒触发10个请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何每秒触发10个请求,而不是等待jmeter中以前的线程完成.

How to fire 10 requests per second instead of waiting for previous threads to complete in jmeter.

需要击中1000次,

当前线程组中的以下配置, 用户数:10 循环次数:100

Currently the below configuration in Thread Group, Number of users : 10 Loop :100

我猜想线程甚至在等待一秒钟后都会得到响应.

I guess the thread is waiting to get response even after second.

但是无论响应如何,我都需要每秒触发10个请求.

But I need to fire 10 requests per second irrespective of response.

恒定吞吐量计时器将对此有用吗? 如果是这种情况,我应该提供什么配置.

Constant Throughput Timer will be useful to do this ? if that is the case what configuration I should provide .

我们非常感谢您的帮助.

Any help is highly appreciated..

推荐答案

是的,恒定吞吐量计时器肯定会有所帮助.

Yes, Constant Throughput Timer will definitely help.

  1. 在目标吞吐量字段中放入600(10个请求/秒* 60秒)
  2. 将计算吞吐量基于"更改为All active threads
  3. 确保您有足够的线程.我个人将其增加到至少20个,因为JMeter无法启动额外的线程来生成请求的吞吐量,它只能暂停线程以将负载限制为定义的值
  4. 确保测试持续足够长的时间.恒定吞吐量计时器在分钟"级别上非常准确,因此您的测试至少需要持续1分钟.还应考虑合理的上升和下降值,以免出现尖峰"
  1. Put 600 in Target Throughput field (10 requests/second * 60 seconds)
  2. Change "Calculate Throughput based on" to be All active threads
  3. Make sure that you have enough threads. Personally I would increase it at least to 20 as JMeter is not capable of kicking off extra threads to generate the requested throughput, it can only pause threads to limit the load to defined value
  4. Make sure that your tests lasts long enough. Constant Throughput Timer is quite accurate on "minute" level so your test needs to last for at least 1 minute. Also consider reasonable ramp-up and ramp-down values to avoid "spikes"

请参见如何使用JMeter的吞吐量常量计时器指南更详细的解释和说明.

See How to use JMeter's Throughput Constant Timer guide for more detailed explanations and instructions.

顺便说一句,在吞吐量塑造计时器的增强版本. href ="http://jmeter-plugins.org/" rel ="noreferrer"> JMeter插件捆绑包,也许会更易于使用.

By the way, there is an enhanced version called Throughput Shaping Timer available at JMeter Plugins bundle, maybe it'll be easier to use.

这篇关于如何在Jmeter中每秒触发10个请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆