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

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

问题描述

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

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 .

非常感谢任何帮助..

推荐答案

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

Yes, Constant Throughput Timer will definitely help.

  1. 600 放入目标吞吐量字段(10 个请求/秒 * 60 秒)
  2. 将计算吞吐量基于"更改为所有活动线程
  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.

顺便说一下,Throughput Shaping Timer 有一个增强版,可在 JMeter Plugins 包,也许会更容易使用.

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天全站免登陆