我怀疑是 TCP 链接没有复用, 每次执行 curl 命令都要重建 TCP 链接导致的, 所以想试着开启 HTTP2 Multiplexing, 官网倒是有介绍, https://curl.se/docs/http2.html 但不知道怎么开, 以及能不能在命令行中开启
以下是 CURL 命令和所输出的结果
curl \
-w "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 time_total: %{time_total}\n" \
-o /dev/null -s \
--http2 \
'https://bing.com'
time_namelookup: 0.010229
time_connect: 0.069974
time_appconnect: 0.195230
time_redirect: 0.000000
time_pretransfer: 0.195348
time_starttransfer: 0.257910
time_total: 0.257964
curl, time_total, TCP, 命令