性能测试工具 jmeter 常用参数的解释 Elapsed time、Latency、Connect Time、Median 等

会飞的猪 · 2019年07月23日 · 3171 次阅读

Elapsed time. JMeter measures the elapsed time from just before sending the request to just after the last response has been received. JMeter does not include the time needed to render the response, nor does JMeter process any client code, for example Javascript.

Elapsed time :从发送请求到收到最后的响应时间,所花费的时间。不包括渲染请求所花费的时间,同时也不包括处理客户端脚本所花费的时间。

Latency. JMeter measures the latency from just before sending the request to just after the first response has been received. Thus the time includes all the processing needed to assemble the request as well as assembling the first part of the response, which in general will be longer than one byte. Protocol analysers (such as Wireshark) measure the time when bytes are actually sent/received over the interface. The JMeter time should be closer to that which is experienced by a browser or other application client.

Latency:从发送请求到收到第一个响应,所花费的时间。网上还有种说法,就是响应信息越大,差别越大。

Connect Time. JMeter measures the time it took to establish the connection, including SSL handshake. Note that connect time is not automatically subtracted from latency. In case of connection error, the metric will be equal to the time it took to face the error, for example in case of Timeout, it should be equal to connection timeout.

Connect Time:建立连接所花费的时间。包括 SSL 三次握手的时间。值的注意的 latency 没有减去建立连接花费的时间,当出现链接超时等错误,这个会等于链接超时时间。

问题 1:什么情况下 Elapsed time 远大于 Latency

问题 2:网络差时最直接的表现是否是 Connect Time 长

总结:
1、当发送的请求体大响应体大时 Elapsed time 会包含大量的数据传输时间,这个时候对网络的要求就会很高。所以压测机器要尽量保持和被测机器在一个局域网内,降低数据网络延时导致的响应时间过长。

2、聚合报告中使用的时间为 Elapsed time。

3、Elapsed time 永远大于 Latency,且响应信息越大,差值越大。

聚合报告中的三个数据的截图:

As of JMeter 3.1, this metric is only computed for TCP Sampler, HTTP Request and JDBC Request.
Median is a number which divides the samples into two equal halves. Half of the samples are smaller than the median, and half are larger. [Some samples may equal the median.] This is a standard statistical measure. See, for example: Median entry at Wikipedia. The Median is the same as the 50th Percentile

有一部分为个人己见,欢迎各位大佬点评
附上 jmeter 官方解释
https://jmeter.apache.org/usermanual/glossary.html

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册