使用 JMeter 从站时如何计算吞吐量?

How is throughput calculated when using JMeter slaves?

鉴于我有一个 JMeter 测试脚本,该脚本的吞吐量恒定为每分钟 200 个事务(运行 线程), 我有两个由 JMeter master 控制的 slaves 将执行该脚本,结果吞吐量会加倍还是 JMeter 会在 slaves 之间分担负载,导致仍然是 200TPM?

干杯, 凯

我在 http://jmeter.apache.org/usermanual/remote-test.html 上找到了答案:

Note: The same test plan is run by all the servers. JMeter does not distribute the load between servers, each runs the full test plan. So if you set 1000 Threads and have 6 JMeter server, you end up injecting 6000 Threads.

JMeter slaves 完全是 independent 野兽,因此他们对彼此一无所知,所以两个节点都会产生 200 TMP,因此你总共会得到 400。添加额外的节点将增加额外的 200 TMP。

尽管它的名字 Constant Throughput Timer doesn't have to be "constant", you can define throughput default value using __P() function${__P(TPS,200)} 并在你通过 -G 命令行选项开始测试时修改它,比如:

jmeter -GTPS=100 -n -r -t ... 

甚至在您的测试 运行 时使用 Beanshell Server 也可以这样做。

请参阅 Apache JMeter Properties Customization Guide 以了解有关 JMeter 属性概念的更多信息。