Measure Where a Website Loses Time
Use curl's -w timing variables to break a page load into DNS, connection, TLS and server-response phases.
01Command
$ curl -L -o /dev/null -s -w 'dns:%{time_namelookup}s connect:%{time_connect}s tls:%{time_appconnect}s firstbyte:%{time_starttransfer}s total:%{time_total}s\n' https://example.com02What it does
Each variable measures a phase boundary: time_namelookup is DNS resolution, time_connect is the TCP handshake, time_appconnect adds the TLS handshake, time_starttransfer adds the server thinking time before the first byte, and time_total is everything. Whichever phase contributes the biggest jump is your bottleneck — huge DNS time suggests a resolver problem, high time_starttransfer means the server itself is slow to answer. The page body is discarded to /dev/null, so the test measures timing only, not download size.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- curl — transfer data from or to a server (macOS man page)Evidence: Documents the -w/--write-out variables time_namelookup, time_connect, time_appconnect, time_starttransfer and time_total for timing each phase of a request.
Last verified: 2026-09-18 · Category: Network
06Related solutions
Erase the broken Spotlight database so macOS re-indexes your drive from scratch.
Read the serial number, model identifier and chip without opening About This Mac.
See how many charge cycles the battery has used and its health condition.