Snippets: DevOps: Networking: HTTP Timing Details with curl

 20th August 2020 at 2:19pm
curl -L --output /dev/null --silent --show-error --write-out 'lookup:        %{time_namelookup}\nconnect:       %{time_connect}\nappconnect:    %{time_appconnect}\npretransfer:   %{time_pretransfer}\nredirect:      %{time_redirect}\nstarttransfer: %{time_starttransfer}\ntotal:         %{time_total}\n' 'baidu.com'

lookup:        0.004
connect:       0.047
appconnect:    0.000
pretransfer:   0.047
redirect:      0.000
starttransfer: 0.092
total:         0.092

每个字段的具体含义可以看 curl 文档