Last updated 1 year ago
Option 1: to measure total time:
total time
curl -o /dev/null -s -w 'Total: %{time_total}s\n' https://www.google.com
Sample output:
Total: 0.441094s
Option 2: to get time to establish connection, time to first byte (TTFB) and total time:
time to establish connection
time to first byte (TTFB)
curl -o /dev/null -s -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' https://www.google.com
Establish Connection: 0.020033s TTFB: 0.417907s Total: 0.435486s
Ref: Get response time with curl