curl-time-format.txt
\n
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_redirect: %{time_redirect}\n
time_pretransfer: %{time_pretransfer}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
curl -w "@curl-time-format.txt" -vv http://baidu.com
字段含義
time_namelookup:DNS 域名解析的時(shí)候指黎,就是把 baidu.com 轉(zhuǎn)換成 ip 地址的過程
time_connect:TCP 連接建立的時(shí)間宣鄙,就是三次握手的時(shí)間
time_appconnect:SSL/SSH 等上層協(xié)議建立連接的時(shí)間色建,比如 connect/handshake 的時(shí)間
time_redirect:從開始到最后一個(gè)請(qǐng)求事務(wù)的時(shí)間
time_pretransfer:從請(qǐng)求開始到響應(yīng)開始傳輸?shù)臅r(shí)間
time_starttransfer:從請(qǐng)求開始到第一個(gè)字節(jié)將要傳輸?shù)臅r(shí)間
time_total:這次請(qǐng)求花費(fèi)的全部時(shí)間
參考: https://cizixs.com/2017/04/11/use-curl-to-analyze-request/