Jmeter aggregate report total throughput - how is

2019-05-26 16:28发布

I have problem to find out how total value in aggregate report is calculated. Do anybody know algorithm for this value ?

Basing on Jmeter documentation for single call is calculate as: total execution/ time of execution. Problem is that total value for throughput isn't number of total executions divided by total time of test. It is calculated in more smart way and I looking for algorithm of this smart way :).

1条回答
疯言疯语
2楼-- · 2019-05-26 16:56

As per The Load Reports guide:

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.

As per 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).

As per Calculator class from JMeter's source

/**
 * 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
}
查看更多
登录 后发表回答