0
votes

First off, I'm new to JMeter and wanted to clear some doubts regarding the relationship between Load time, Connect time, and Latency.

I found some resources that explain the relationship between these metrics:

Latency time – Connect time = Server Processing Time

Elapsed time – Latency time = Download Time resource

And then another resource says this: Response Time = Latency + Processing Time

Given below is one of the sampler results I got. If you take this into consideration, can we really comment on how long it took for the server to process the request?

NOTE: In this scenario, my plan is to analyze how much of a load the server had to withstand. I don't really care about the delay of connection establishing and passing around of data packets.

enter image description here

Basically, I want to know the connection between the 3 aforementioned metrics: Load time, Connect time, and Latency. Any help is greatly appreciated. Thanks in advance :)

3

3 Answers

1
votes

You cannot say "how long it took for the server to process the request" by looking to JMeter results because:

The request lifecycle looks like:

  1. JMeter establishes the connection (connect time)
  2. JMeter sends request body to the server (unknown)
  3. Server processes the request (unknown)
  4. Server sends the response to JMeter (unknown)
  5. JMeter receives the first byte of the response (Latency)
  6. JMeter receives the last byte of the response (Elapsed time)

So you cannot say what is the server processing time even with millisecond precision as JMeter can only get high-level network metrics, if you want to enrich your report with server processing time you need to use an APM or a profiler tool or at least something like JMeter PerfMon Plugin to get this form of information directly from the application under test.

1
votes

This documentation explains the metrics :

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.

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.

Load time or 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.
0
votes

In layman terms I would describe these terms as below:

Load time: total time taken by the request. First req to the final packet

Connect time: Time taken by the request to reach the server

Latency: time taken by request for first response. (if the response is small this can be same as load time)