↑ ↓ select, Enter open, Esc close

Measure TTFB repeatedly with minimum, median and maximum

Adjust the values, the command updates live
user@server
for i in $(seq 10); do curl -o /dev/null -s -w '%{time_starttransfer}\n' https://example.com/; done | LC_ALL=C sort -n | awk '{a[NR]=$1; s+=$1} END {printf "Min: %.3fs  Median: %.3fs  Max: %.3fs  Schnitt: %.3fs\n", a[1], a[int((NR+1)/2)], a[NR], s/NR}'

Requests the URL several times and evaluates the time to first byte statistically. A single measurement says little, only the median and outliers show whether a page cache is working or the response time fluctuates heavily. TTFB feeds directly into the LCP of the Core Web Vitals.

Note: The entry on measuring HTTP load times in the network category shows the individual phases of a request (DNS, connection and TLS). The summary labels in the output are German (“Schnitt” means average).

Also searched as

  • measure time to first byte multiple times
  • check fluctuating server response times
  • average ttfb curl
  • how fast does my server respond on average

Related one-liners

All in SEO checks

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.