Inspired by Joseph Scott's post¹ and Radovan Svedic's comment² let's have a nice box formatting for cURL's timing output.
curl -sw "@$HOME/.curl_time.txt" https://ddg.gg/
# or without website output
curl -o /dev/null -sw "@$HOME/.curl_time.txt" https://ddg.gg/
- ¹) https://blog.josephscott.org/2011/10/14/timing-details-with-curl/
- ²) https://stackoverflow.com/questions/17638026/calculating-server-processing-time-with-curl/41739711#41739711
Don't forget to save .curl_time.txt
from below to your home dir!
q@bullshit:~$ curl -o /dev/null -Lsw "@$HOME/.curl_time.txt" https://ddg.gg/
┌───▫ REQUEST TIMING ▫───┐
│namelookup...: 0,008404s│
│connect......: 0,134121s│
│appconnect...: 0,304982s│
│pretransfer..: 0,305334s│
│redirect.....: 0,341413s│
│starttransfer: 0,437185s│
│time_total...: 0,438552s│
│┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄│
│ server processing time │
│ (0,437185 - 0,305334)s │
└────────────────────────┘
q@bullshit:~$ echo 0,437185 - 0,305334|tr , .|bc
.131851