JMeter 4.0 |分布式测试 |话题 |仪表板报告 |随时间变化的活动线程

JMeter 4.0 | Distributed Testing | Threads | Dashboard Report | Active Threads Over Time

我已经为分布式负载测试配置了以下配置的脚本。现在,当我执行脚本时。生成的仪表板报告:随时间变化的活动线程数 显示 x 轴 "Number of Active Threads" 仅为 25。 但是根据分布式测试设置,如果要对 50 个用户执行负载测试,而不是在主机上执行,线程将配置为 25 到 运行 每个从属机器上的 25

现在,这里的问题是为什么 随时间变化的活动线程数 显示 x 轴 "Number of Active Threads" 为 50 而不是 25。

因此,为了正确访问图表,我需要 随时间变化的活动线程数 显示 x 轴 "Number of Active Threads" 为 50,其中包括每个从机活动线程.如何实现。

根据Active Threads Over Time Listener documentation

If you are doing distributed tests, you should name the thread groups like this in your test plan:

${__machineName()}_My Threadgroup name

因此您需要使用 __machineName() and/or __machineIP() functions as the prefix or postfix for the Thread Group 标签,以便 JMeter Listeners 可以区分来自不同远程从站的示例结果。

查看 How to Perform Distributed Testing in JMeter 以获取有关远程测试的更多信息,包括一些提示和技巧,例如 运行 特定机器上的特定采样器、configuring/disabling 主从之间的流量加密等。