Jmeter:测试 5 个用户的场景,加速 1 小时以触发 10,000 个请求 [英] Jmeter: Scenario to test 5 users with ramp up 1 hour to trigger 10 thousand requests

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

问题描述

Jmeter:我们有一个场景,5 个用户应该在 1 小时内触发 10000 个请求,为了实现这一点,以下配置已经完成.

  1. 线程组 - 用户 - 5;上升 - 3600(秒);循环次数 - 1
  2. 循环控制器值:10000
  3. 请求在这个循环控制器下

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

这些配置是否正确以实现我们的场景负载测试输出.

请提出建议和指导.

解决方案

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

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

您不会在 1 小时内平均分配 10 000 个请求,而是在峰值"中有 50 000 个请求

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

  • 线程组(用户数:5,加速周期:1,循环次数:永远,持续时间:3600)

    • 请求

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

<小时>

在大多数情况下,使用自定义线程组更容易,例如

您可以使用

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. Thread group - users - 5; ramp up - 3600 (secs); loop count - 1
  2. Loop controller value: 10000
  3. Request is under this Loop Controller

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 will start with one user which will execute 10 000 requests as fast as it can
  2. In 12 minutes another user will start and execute 10 000 requests as fast as it can
  3. In 12 minutes another user will start and execute 10 000 requests as fast as it can
  4. etc.

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:

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

    • Request

      • Constant Throughput Timer with Target Throughput: 166.6666666667

        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.

You can install custom thread groups using JMeter Plugins Manager

这篇关于Jmeter:测试 5 个用户的场景,加速 1 小时以触发 10,000 个请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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