skip to content

In a JMeter JTL row, what do the elapsed, Latency and Connect columns each measure?

level: middleimportance: must knowfreq 64%

answer

  1. Three readings, one start instant
  2. Nested spans, not consecutive segments
  3. Idle time comes out of all three
  4. One stops at the first response byte
  5. Connect is not subtracted from Latency

basics

~10 s

All three are millisecond timings taken from the same instant the sample started. Connect stops when the connection is established, Latency when the first response arrives, elapsed when the last response byte arrives.

solid answer

~40 s

JMeter starts one clock per sample and reads it three times. `Connect` is read when the connection has been established, including the TLS handshake; `Latency` is read just after the first part of the response has been received; `elapsed` is read just after the last part has been received. Because they share a start, they nest — `Connect` <= `Latency` <= `elapsed` — and the manual is explicit that connect time is **not** subtracted from latency. All three also have `IdleTime` subtracted, which is how deliberately excluded time (a paused sample) is kept out of the figures. `elapsed` stops at the last byte received: it contains no client-side rendering and no JavaScript execution, because JMeter never runs either.

go deeper

for a junior

Recall that all three are milliseconds and that elapsed is the whole-sample time. Being able to point at the right column when someone asks for response time is what is expected here.

for a middle

Explain the shared start instant, the nesting order Connect inside Latency inside elapsed, and that connect time is not subtracted from latency. This is the tier the question is really aimed at.

for a senior

Read a real file and reason about it: derive server wait from Latency minus Connect, recognise zero Connect as connection reuse, and know that elapsed excludes rendering before anyone quotes it as user-perceived time.

for a principal

Insist that the team agrees which derived figure it argues from before a run, so two people reading the same kept JTL do not arrive at different response-time definitions months apart.

These three columns are the reason a JTL is worth keeping. A screenshot of a graph tells you a number; the JTL tells you which clock produced it. Getting the three straight is the difference between an evidence file you can still defend six months later and a spreadsheet of numbers nobody can explain. ## One clock, three readings JMeter does not run three timers. It records a single start instant for the sample and then reads the elapsed wall clock at three moments: 1. **`Connect`** — read when the connection has been established. The manual states this includes the SSL handshake, and that on a connection failure the value is the time taken to hit the error, so a connection timeout shows up as roughly the configured connect timeout. 2. **`Latency`** — read just after the first part of the response has been received. The manual notes this therefore covers assembling the request as well as assembling the first chunk of the response, which in practice is more than a single byte. 3. **`elapsed`** — read just after the last part of the response has been received. ## They nest; they do not add up Because all three are measured from the same start, they are cumulative, not three consecutive segments: ``` sample start |<-- Connect -->| |<--------- Latency --------->| |<---------------- elapsed ---------------->| ``` The manual says it outright: *connect time is not automatically subtracted from latency*. If you want the server-side wait, that is `Latency - Connect`; if you want the body-transfer time, that is `elapsed - Latency`. Adding `Connect + Latency + elapsed` produces a number that means nothing, and it is the single most common misreading of this file. ## IdleTime comes out of all three `IdleTime` is time deliberately excluded from a sample, and JMeter subtracts it from each of the three readings — `elapsed` is end minus start minus idle, and both `Latency` and `Connect` are computed the same way. On an ordinary HTTP sample it is `0`; it becomes non-zero where a sample is explicitly paused, which is how JMeter keeps engineered waits from inflating a timing column. ## When a column is legitimately zero - `Connect` is `0` when no connection was opened for that sample — a reused keep-alive connection does no connecting, so there is nothing to time. - `Connect` is `0` for sampler families that never record it at all. - `Latency` can equal `elapsed` when the whole response arrives in one piece. - A parent row that aggregates sub-samples carries an `elapsed` stretched to cover all of them, because the parent's end time is extended to the end of the last child. ## What these columns are not `elapsed` stops at the last response byte. JMeter neither renders the response nor executes JavaScript, so the number is a protocol timing, not a page-load timing. And what you should *do* with a column full of these values — which summary to quote, how tails behave, how to compare offered and achieved rates — is reading-results and percentile material owned by the performance-testing foundations topics, not by the file format. Here the job is narrower and more useful: know exactly which instant each number was taken at, so nobody has to guess later.

  • How do you get the server think time and the body transfer time out of a JMeter JTL row?
    Subtract, do not read directly. `Latency - Connect` leaves the request send plus the server's own wait; `elapsed - Latency` leaves the transfer of the rest of the response. JMeter writes no column for either, because all three stored values share the same start instant.
  • A JMeter JTL row shows Connect 0 and Latency 240. Is the row broken?
    Almost certainly not. The commonest cause is a reused keep-alive connection: no connection was established for that sample, so there was nothing to time. Sampler families that never record connect time also leave it at 0.
  • Why does a JMeter elapsed value not match what a browser reports for the same page?
    JMeter stops the clock just after the last response byte. It does not render the response and it does not run JavaScript, so everything a browser spends on parsing, layout, paint and script is outside JMeter's number by construction.

Think of one stopwatch started when the sample begins and three split buttons pressed as the request progresses. Each split shows total time since the start, so the splits nest inside one another; reading them as three separate laps and adding them up gives a total that never happened.

saying these in an interview costs you the question

  • Adds Connect, Latency and elapsed together for a total
  • Says Latency is measured from the end of Connect
  • Claims elapsed includes page rendering time
  • Treats a zero Connect column as a broken result file
  • Thinks IdleTime is added to elapsed rather than removed