在 JMeter 中,为什么加载时间等于延迟?

In JMeter, why does load time equal latency?

我正在使用 JMeter 进行负载测试,在用户单击按钮提交表单时触发的某些端点上,加载时间等于延迟。我想知道为什么?

根据JMeter glossary

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.

所以“延迟”的另一个术语是 time-to-first-byte

再次查看上述词汇表:

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.

所以“经过的时间”的另一个术语是 time-to-last-byte

因此,经过时间和延迟之间的增量是所有响应在被测应用程序之间传输回 JMeter 的时间,如果响应足够小并且连接足够快,则整个情况可能就是这样可以在同一毫秒内收到响应。

另一个可能的原因是响应是cached so no actual request is being made, just little fast lightweight HEAD请求检查是否需要重新请求正文数据