JMeter 5.0:在树监听器中查看结果仅显示最后 100 个线程的结果

JMeter 5.0: View results in a tree listener shows result of last 100 threads only

我们对 200 个用户执行了脚本,然后看到在树监听器中查看结果只显示最后 100 个用户的结果?为什么会自动清空数据?

这是 JMeter 自版本 4.0 以来的常规行为。

View Results Tree 之前将所有 SamplerResults 存储在内存中,因此使用 GUI 模式进行负载测试的用户最终会出现 OutOfMemory。

因此 Jmeter 团队引入了一种新行为,它只保留有限数量的结果并且不会立即刷新。

属性 控制这个可以在user.properties中修改:

view.results.tree.max_results Maximum number of main samples, that should be stored and displayed. A value of 0 will store all results. This might consume a lot of memory. Defaults to: 500

无论如何你永远不应该在 gui 模式下加载测试,使用非 gui 模式并使用以下方法生成 html 报告:

jmeter -n -t test.jmx -l results.csv -e -o report-output-folder