JMeter 3.1:GUI模式和非GUI模式的结果不同 [英] JMeter 3.1: different results in GUI mode and non-GUI mode
问题描述
我知道负载测试应该在非GUI模式下运行.
I know load tests should be run in non-GUI mode.
但是,当我使用以下命令运行测试时:
But when I run the tests with the following command:
jmeter -n -t server_load_test.jmx -l log_100u_5s_01.jtl
在非GUI模式下: 我得到3到4秒的平均响应时间,这当然是不可接受的.
In non-GUI mode: I get an average response time between 3 or 4 seconds which of course is not acceptable.
在GUI模式下: 我得到的平均响应时间为100毫秒.
In GUI mode: I get an average response time of 100ms.
测试非常简单,它只是一个HTTP请求(GET),在5秒钟内有100个用户.
The test is really simple, it is just an HTTP request (GET) with 100 users in 5 seconds.
如果相反,我什么也不会说.
I would not have said anything if it was the other way around.
我应该信任哪个人?
我的问题更多是:怎么回事,如何找到问题?
Which one should I trust?
My question is more: what is going on and how do I find the problem?
推荐答案
非GUI模式消耗的资源比GUI模式少,因此,我建议您不仅要考虑平均响应时间,还要牢记其他重要指标,例如,在两种情况下检查交付的负载,即:
Non-GUI mode consumes a way less resources that GUI mode so I would recommend looking not only into Average Response Time, but also keep in mind other important metrics, for example check delivered load in both scenarios, i.e:
- 一段时间内的活动线程和 JMeter插件项目
- 生成HTML报告仪表板,并比较两种情况下的输出结果
- 使用第三方分析解决方案,例如 JAnalyser 或
- Active Threads Over Time and Transactions per Second listeners output (both are available via JMeter Plugins project
- Generate HTML Reporting Dashboard and compare the output for both scenarios
- Use 3rd-party analysis solution like JAnalyser or BM.Sense
我的期望是,在GUI模式下,您的启动速度要慢得多,因此您可能会遇到某些线程已经完成工作而其他线程尚未启动的情况.在非GUI中,升级速度更快,因此您拥有更多的在线用户,因此传递给被测应用程序的负载要高得多.
My expectation is that in GUI mode you have much slower ramp-up hence you can run into the situation when some threads already had already finished their work while others were not yet started. In non-GUI ramp-up is faster so you have more online users so the load delivered to your application under test is much higher.
尝试增加循环计数和测试持续时间,以了解其运行情况.
Try increasing loop count and test duration to see how it goes.
这篇关于JMeter 3.1:GUI模式和非GUI模式的结果不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!