Cheatsheet Pages / curl Cheatsheet
How to measure response time and status code with curl — -w
Is it slow, and where does the time go? Get the status code and timings in one line.
curl -s -o /dev/null -w "code=%{http_code} time=%{time_total}s size=%{size_download}\n" \
https://example.com
# more variables: %{time_connect} %{speed_download} %{url_effective}
Good to know
More variables exist: %{time_connect}, %{speed_download}, %{url_effective} — and -o /dev/null discards the body so it cannot skew the measurement.
