参考:https://blog.csdn.net/jackyzhousales/article/details/82799494
更多时间参数参考 https://www.cnblogs.com/shell-blog/p/5466905.html
示例:curl www.baidu.com -w "time_connect: %{time_connect} time_starttransfer: %{time_starttransfer} time_total: %{time_total} "
更多参数参考如下
参数 |
含义 |
|
time_namelookup |
DNS解析域名时间 |
|
time_connect |
TCP连接的时间,三次握手的时间 |
|
time_starttransfer |
从请求开始到第一个字节将要传输的时间 |
|
time_total |
总时间 |
|
speed_download |
下载速度,单位-字节每秒 |
|
time_appconnect |
SSL|SSH等上层连接建立的时间 |
|
time_pretransfer |
从请求开始到响应开始传输的时间 |
|
time_redirect |
从开始到最后一个请求事务的时间 |
curl -H 'Host:www.test.com' http://10.44.54.111/test.php
或 curl -x 10.44.54.111:80 http://www.test.com/test.php