Jmeter中的吞吐量计算 [英] Throughput calculation in Jmeter

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

问题描述

所附带的是我的测试的Summary Report.

Attached is the Summary Report for my tests.

请帮助我了解JMeter如何计算吞吐量值: 例如第一行53.1/min的吞吐量,JMeter用哪个公式如何计算该数字.

Please help me understand how is the throughput value calculated by JMeter: example the throughput of the very first line 53.1/min, how was this figure calculated by JMeter with which formula.

此外,想知道后续测试中的吞吐量值如何划分为分钟或秒.例如,第二行的吞吐量为1.6/sec,那么JMeter如何根据时间单位计算此吞吐量值?

Also, wanted to know how are the throughput values in the subsequent test divided into mins or secs. example the 2nd line has a throughput 1.6/sec, so how does JMeter calculate this throughput values based on the time units ?

尝试了网络上的许多网站,并得到了一个普遍的答复,即吞吐量是测试期间发送到服务器的每单位时间(秒,分钟,小时)的请求数.但这不适用于我在图表中看到的结果,方法不需直接解释.

Tried many websites on the net and have got a common reply that the throughput is the number of requests per unit of time (seconds, minutes, hours) that are sent to your server during the test. But that didn't apply to the results I see in my graph the way it was explained straight forward.

推荐答案

文档定义吞吐量为

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

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

因此,在您的情况下,您有1个请求,耗时1129ms,所以

So in your case you had 1 request, which took 1129ms, so

Throughput = 1 / 1129ms = 0.00088573959/ms 
           = 0.00088573959 * 1000/sec = 0.88573959/sec 
           = 0.88573959 * 60/min = 53.1443754/min, rounded to 53.1/min

1个请求的总时间(或经过的时间)与此单个操作的时间相同.对于多次执行的请求,它等于

For 1 request total time (or elapsed time) is the same as the time of this single operation. For requests executed multiple times, it would be equal to

Throughput = (number of requests) / (average * number of requests) = 1 / average

例如,如果您截取屏幕快照的最后一行(有21个请求),则平均为695,因此吞吐量为:

For instance if you take the last line in your screenshot (with 21 requests), it has an average of 695, so throughput is:

 Throughput = 1 / 695ms = 0.0014388489/ms = 1.4388489/sec, rounded to 1.4/sec

就单位(秒/分钟/小时)而言,摘要"报告将执行以下操作:

In terms of units (sec/min/hour), Summary report does this:

  • 默认情况下,它以秒为单位显示吞吐量
  • 但是如果以秒为单位的吞吐量< 1.0,它将转换为分钟
  • 如果仍然< 1.0,它将转换为小时
  • 此后将值四舍五入为1个小数位.

这就是为什么有些值以秒显示,有些值以分钟显示,而有些则以小时显示的原因.有些甚至可能具有值0.0,这基本上意味着吞吐量小于< 0. 0.04

This is why some values are displayed in sec, some in min, and some could be in hours. Some may even have value 0.0, which basically means that throughput was < 0.04

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

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