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

查看:2279
本文介绍了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来源的Calculator

/**
 * 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天全站免登陆