Jmeter:方案测试5个用户,并在1小时内启动以触发1万个请求 [英] Jmeter: Scenario to test 5 users with ramp up 1 hour to trigger 10 thousand requests

查看:842
本文介绍了Jmeter:方案测试5个用户,并在1小时内启动以触发1万个请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Jmeter:我们有一个场景,其中5个用户应在1小时内触发1万个请求,以实现以下配置.

Jmeter: We have a scenario where 5 users should trigger 10 thousand requests in 1 hour, to achieve this below configurations have been done.

  1. 线程组-用户-5;加速-3600(秒);循环计数-1
  2. 回路控制器值:10000
  3. 请求在此循环控制器下

执行上述情况时,Jmeter仅在1秒内执行/触发5个用户.

When executed the above scenario, Jmeter is executing/triggering 5 users in 1 second only.

这些配置是否正确才能实现我们的方案负载测试输出.

Are these configurations correct to achieve our scenario load testing output.

请提出建议并进行指导.

Please suggest and guide.

推荐答案

您的配置有些不正确.在您的设置中

Your configuration is a little bit incorrect. In your setup

  1. JMeter将从一个用户开始,该用户将尽可能快地执行10000个请求
  2. 在12分钟内,另一个用户将尽快启动并执行10000个请求
  3. 在12分钟内,另一个用户将尽快启动并执行10000个请求

您不会在1小时内平均分配10000个请求,相反,您会在峰值"中收到5万个请求

You will not get 10 000 requests evenly distributed for 1 hour, instead you will have 50 000 requests in "spikes"

相反,我建议采用以下配置:

Instead I would suggest the following configuration:

  • 线程组(用户数量:5,加速时间:1,循环计数:永久,持续时间:3600)

  • Thread Group (Number of Users: 5, Ramp-Up Period : 1, Loop Count: Forever, Duration: 3600)

  • 请求

  • Request

恒定吞吐量计时器会将JMeter限制为所需的速率,该速率将在一个小时内为您提供10,000个请求(假设您的应用程序能够足够快地处理请求)

Constant Throughput Timer will limit JMeter to the desired rate which will give you 10 000 requests in hour (assuming your application will be able to handle the requests fast enough)

在大多数情况下,使用自定义线程组比较容易,例如最终线程组.配置起来更容易,因为它提供了一个图表,展示了预期的虚拟用户行为.

In the majority of cases it's easier to use custom Thread Groups such as Ultimate Thread Group. It's easier to configure as it provides a graph demonstrating anticipated virtual users behaviour.

您可以使用 JMeter插件管理器

这篇关于Jmeter:方案测试5个用户,并在1小时内启动以触发1万个请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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