计时模板
计时模板
curl -so /dev/null -w 'dns %{time_namelookup} conn %{time_connect} tls %{time_appconnect} ttfb %{time_starttransfer} total %{time_total}\n' https://example.com/healthz多次重复取稳定区间的值; 关注 time_starttransfer 与服务端处理时长的差值。
用 -w 模板把 DNS、连接、TLS、首字节与总时长拆开, 定位延迟发生在链路还是服务端。
curl -so /dev/null -w 'dns %{time_namelookup} conn %{time_connect} tls %{time_appconnect} ttfb %{time_starttransfer} total %{time_total}\n' https://example.com/healthz