Jmeter-尝试在时间限制内完成线程
Jmeter- attempt to finish threads in a time limit
所以我的要求是系统应该能够在 1 小时内处理 10000 个请求。所以这意味着我应该 运行 进行测试,看看它处理 10k 请求(不是并发用户)的速度有多快。我从来没有做过这样的事情,因为我的要求在并发用户中消失了。有人能告诉我要使用什么线程组以及应该如何设置它来完成这个特定任务。同样,最终目标不是达到 10k 个并发用户,而是 运行 10k 个请求,看看它们能多快完成。
一小时内 10 000 个请求相当于每分钟 166.6 个请求或每秒 2.7 个请求。
您可以使用 Constant Throughput Timer or Throughput Shaping Timer 来将 JMeter 的吞吐量限制为给定的数字,并查看它是否能够在 1 小时内完成 10k 个请求。
测试 运行 可能会更短,因为您看到 throughput 指标超过每秒 2.7 个请求 - 很可能被测系统无法处理负载。
一旦您确信您的系统可以在一小时内处理 10k 个请求,您可以增加吞吐量以查看 if/where/when 它是否中断。
您需要在 3600 秒内完成 10000 个请求。
假设(最后一个)请求最多花费 100 秒,您应该使用最大 [ramp up][1] = 3500 而线程数 = 10000
定义的线程组执行
Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish
我建议从 Ramp up = 3500 开始并减少数量,直到请求开始失败。
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen.
另一种选择是使用 JMeter 插件 Concurrency Thread Group
simplified approach for configuring threads schedule. It is intended to maintain the level of concurrency, which means starting additional during the runtime threads if there's not enough of them running in parallel. Unlike standard Thread Group, it won't create all the threads upfront, so extra memory won't be used. It's a good repacement for Stepping Thread Group, since it allows threads to finish their job gracefully.
在你的情况下,一个小时内没有并发用户:
Target Concurrency = 1 (not concurrent)
Ramp up Time - 60 (minutes)
Ramp up Steps Count 1
Hold Target Rate Time 60 (minutes)
Thread Iteration Limit 1 (not concurrent)
所以我的要求是系统应该能够在 1 小时内处理 10000 个请求。所以这意味着我应该 运行 进行测试,看看它处理 10k 请求(不是并发用户)的速度有多快。我从来没有做过这样的事情,因为我的要求在并发用户中消失了。有人能告诉我要使用什么线程组以及应该如何设置它来完成这个特定任务。同样,最终目标不是达到 10k 个并发用户,而是 运行 10k 个请求,看看它们能多快完成。
一小时内 10 000 个请求相当于每分钟 166.6 个请求或每秒 2.7 个请求。
您可以使用 Constant Throughput Timer or Throughput Shaping Timer 来将 JMeter 的吞吐量限制为给定的数字,并查看它是否能够在 1 小时内完成 10k 个请求。
测试 运行 可能会更短,因为您看到 throughput 指标超过每秒 2.7 个请求 - 很可能被测系统无法处理负载。
一旦您确信您的系统可以在一小时内处理 10k 个请求,您可以增加吞吐量以查看 if/where/when 它是否中断。
您需要在 3600 秒内完成 10000 个请求。
假设(最后一个)请求最多花费 100 秒,您应该使用最大 [ramp up][1] = 3500 而线程数 = 10000
定义的线程组执行Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish
我建议从 Ramp up = 3500 开始并减少数量,直到请求开始失败。
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen.
另一种选择是使用 JMeter 插件 Concurrency Thread Group
simplified approach for configuring threads schedule. It is intended to maintain the level of concurrency, which means starting additional during the runtime threads if there's not enough of them running in parallel. Unlike standard Thread Group, it won't create all the threads upfront, so extra memory won't be used. It's a good repacement for Stepping Thread Group, since it allows threads to finish their job gracefully.
在你的情况下,一个小时内没有并发用户:
Target Concurrency = 1 (not concurrent)
Ramp up Time - 60 (minutes)
Ramp up Steps Count 1
Hold Target Rate Time 60 (minutes)
Thread Iteration Limit 1 (not concurrent)