简体   繁体   English

如何在JMeter中正确配置请求数?

[英]How to correctly configure number of requests in JMeter?

My performance test strategy is to use JMeter to send 3 different requests to a linux server continually. 我的性能测试策略是使用JMeter连续向Linux服务器发送3个不同的请求。 They are Init, Calculate and Apply. 它们是初始化,计算和应用。

The number of active users of peak hour is 40 and the number of each request per hour is 200. The load test should be conducted with the peak usage with no less than one hour. 高峰时段的活动用户数量为40,每小时每个请求的数量为200。负载测试应在高峰使用时间不少于一小时的情况下进行。

If my understanding is correct, running the test for two hours eventually there will be 1200 samples shown in the result table (200 requests * 3 * 2 hours). 如果我的理解是正确的,那么运行测试两个小时最终将在结果表中显示1200个样本(200个请求* 3 * 2小时)。 However, with the following configuration there are much more samples sent to the server. 但是,使用以下配置,将有更多示例发送到服务器。

Thread Group: 
- Number of threads: 200 
- Ramp-up time: 3600 seconds 
- Duration: 7200 seconds

I have also tried setting the number of threads 50, the result is still far more than my expectation. 我还尝试将线程数设置为50,结果仍然远远超出我的预期。

May I know how to configure the JMeter correctly ? 我可以知道如何正确配置JMeter吗?

Your configuration should be: 您的配置应为:

  • Number of threads : 40 线程数:40
  • Ramp-up time: Should be short in your case, its value tells in how much time threads will go from 0 to 40. 加速时间:在您的情况下应该短一些,它的值表明线程从0到40的时间。
  • Duration is ok 持续时间还可以

Finally, as you want 200 requests per hour, which would be 600 for the 3 ones, it would be 10 per minute, you need to use Constant Throughput Timer inside a Test Action : 最后,由于您希望每小时200个请求,三个请求中的600个,每分钟10个,因此您需要在Test Action中使用Constant Throughput Timer

测试计划

Where Test Action is : 测试动作是:

测试动作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM