gpt4 book ai didi

Jmeter 聚合报告总吞吐量 - 如何计算

转载 作者:行者123 更新时间:2023-12-02 09:36:12 35 4
gpt4 key购买 nike

我无法弄清楚汇总报告中的总值(value)是如何计算的。有人知道这个值的算法吗?

基于 Jmeter 文档,单次调用计算为:总执行/执行时间。问题是吞吐量的总值不是总执行次数除以测试总时间。它以更智能的方式计算,我正在寻找这种智能方式的算法:)。

最佳答案

根据 The Load Reports指南:

Throughput is measured in requests per second/minute/hour. The time unit is chosen so that the displayed rate is at least 1.0. When the throughput is saved to a CSV file, it is expressed in requests/second, i.e. 30.0 requests/minute is saved as 0.5.

根据 JMeter Glossary

Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server. The formula is: Throughput = (number of requests) / (total time).

根据 Calculator来自 JMeter 源代码的类

/**
* Throughput in bytes / second
*
* @return throughput in bytes/second
*/
public double getBytesPerSecond() {
if (elapsedTime > 0) {
return bytes / ((double) elapsedTime / 1000); // 1000 = millisecs/sec
}
return 0.0;
}

/**
* Throughput in kilobytes / second
*
* @return Throughput in kilobytes / second
*/
public double getKBPerSecond() {
return getBytesPerSecond() / 1024; // 1024=bytes per kb
}

关于Jmeter 聚合报告总吞吐量 - 如何计算,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26034134/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com