Skip to content

Timing phases

A HAR records, for each request, how long it spent in each of several phases. slowest, show-entry and report read them. startup and compare use only the total. This page defines the phases and explains the label slowest puts on a request.

The phases of one request A horizontal timeline in six consecutive blocks: blocked, DNS, connect, send, wait and receive. A smaller block marked ssl sits inside connect. A bracket above shows that the total time is the sum of the six blocks. total time = the sum of the six phases blocked dns connect send wait receive ssl queued inthe client look upthe host the server works(time to first byte) read theresponse The ssl block is part of connect, not extra time. A request on an open connection has no dns, connect or ssl.
One request, drawn as a waterfall. The accented block is the one slowest would name if it were the largest.

The phases

Phase What it measures
blocked Time the request spent waiting before it could be sent. Often it is queued behind other requests on the same connection, or waiting for a proxy.
dns Looking up the host name.
connect Opening the connection to the server. When the connection is encrypted this includes the TLS handshake.
ssl The TLS handshake. In a spec-compliant HAR it is already counted inside connect.
send Sending the request, headers and body.
wait Waiting for the server to start answering. It is also called time to first byte, and it is the server's thinking time plus the trip there and back.
receive Reading the response.

A request on a connection that is already open has no dns, connect or ssl. A HAR writes -1 for a phase that does not apply, and WireTrail reads it as "not applicable". slowest prints those phases as 0ms, and the JSON shows null.

The total

The duration WireTrail shows for a request is the time field of the entry, which the capturing tool measured. It is not recomputed from the phases. In a well-made HAR the two agree, and time is the sum of blocked, dns, connect, send, wait and receive, with ssl not added a second time.

The bottleneck label

slowest names the largest single phase of each request:

Label The phase
queueing/blocked blocked
DNS dns
TCP connect connect
TLS handshake ssl
request upload send
server wait/TTFB wait
download/receive receive
unknown None is above zero.

The comparison goes in the order above and the first phase to reach the largest value wins, so a tie goes to the earlier one.

TLS time is inside connect

Because connect includes ssl, connect is never smaller than ssl in a HAR that follows the specification. So TLS handshake is not chosen unless a tool writes ssl separately and larger, and a slow handshake is labelled TCP connect. slowest prints ssl in phases, so read that figure. See Slowest calls.

A label is a place to look

The label says where the time went, and not why. server wait/TTFB points at the server, but a slow network between the client and the server shows up there too, and a capture taken through a proxy measures the proxy's view. Use the label to decide which team to ask, then check with a second measurement.