一尘不染

There is Jmeter response time difference between Jmeter run results and manually captured the response time

jmeter

There is Jmeter response time difference between Jmeter run results and
manually captured the response time from the local system using stop watch on
the web application.

  1. Browse the web app from local windows system and use stop watch to see the response time to load the page.
  2. Run the Jmeter in non-gui/gui mode and observe the response time (used Listeners only to debug, when run the script no listener was added)
  3. Can see there is a difference in both. Please suggest how to know if Jmeter has captured the correct response time.

阅读 223

收藏
2020-07-24

共1个答案

一尘不染

JMeter have three basic measurements it captures per request:

  • Elapsed Time (which is overall timespan from the point when it just starts sending request to the last bit received)

  • Latency (which starts the same point in time and ends when server starts responding)

  • And Connect time (which is included in latency and is basically the time for handshakes with server, including SSL/TLS negotiations)

So if you set a data writer among your listeners (e.g SimpleDataWriter,
although AggregateReport & SummaryReport can do it as well), you’ll see these
metrics in your data file (while standard listeners/visualisers/aggregators
stuck to elapsed time only).

But mind that these metrics doesn’t include response rendering, and especially
any code to be executed by browser.

JMeter just doesn’t do it at all: obviously, it measures just the combined
performance of Server + Network, skipping everything on the client side
(except for bare necessities, like protocol negotiations).

That might explain the difference you’ve experienced.

As well as the difference between logged server processing times & the
response times measured by JMeter: server just doesn’t count what the network
brings in.

PS And you don’t have to sit and click on stopwatch with your browser: modern
ones have a Dev Tools capable of showing you the precision timings divided by
stages. E.g., just call Ctrl+Shift+I in Chrome, switch to network tab & behold
the timings right there as you doing your requests.

2020-07-24