Jmeter 聚合报告总吞吐量 - 如何计算 [英] Jmeter aggregate report total throughput - how is calculated

查看:128
本文介绍了Jmeter 聚合报告总吞吐量 - 如何计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法了解汇总报告中的总价值是如何计算的.有人知道这个值的算法吗?

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

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

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.0.吞吐量保存到CSV文件时,以请求/秒表示,即30.0请求/分钟保存为0.5.

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 词汇表

吞吐量按请求/时间单位计算.时间是从第一个采样开始到最后一个采样结束计算的.这包括样本之间的任何间隔,因为它应该代表服务器上的负载.公式为:吞吐量=(请求数)/(总时间).

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

根据 计算器来自JMeter源代码的类

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
}

这篇关于Jmeter 聚合报告总吞吐量 - 如何计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆