'Latency shown in JMETER is much less when I use faster internet connection & run my Test. Is it due to faster internet or some other factors too?

  1. I created a test in JMETER
  2. Add > Sampler > HTTP Request = Get
  3. Server Name = dainikbhaskar.com
  4. No. of threads(users) = 1 Ramp-up period (seconds) = 1, Loop Count = 1

(My internet connection is a broadband one with the speed 50 MBPS)

  1. I ran the test, ran successful, latency comes as 127 & sometimes less than 100 in subsequent executions.
  2. I switched off my Wi-Fi, connected my laptop with mobile hotspot & executed the same test.
  3. Now the latency is 607, 932, 373, 542, 915
  4. I believe it's happening due to INTERNET CONNECTION SPEED as rest of the inputs are same.

Please confirm whether my perception is correct ? :)



Solution 1:[1]

It is correct.

You can also get network latency from https://www.speedtest.net/ or https://fast.com/

Solution 2:[2]

Latency is the time from sending the request until first byte of response arrives, so called "Time to first byte"

In JMeter's world:

  1. Latency is Connect Time + Time to send the request + time to get the first byte of response
  2. Elapsed time is Latency + time to get the last byte of the response.

More information:

If you get 5x times higher latency for other connection it means that the majority of time is spend for the packets to travel back and forth. You can see the more precise picture by looking at Network tab of your browser developer tools or using a special solution like Lighthouse

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rahul Jadhav
Solution 2 Dmitri T