cURL打出请求详细时间

新建format文件,内容根据需要自定

    time_namelookup:  %{time_namelookup}\n
       time_connect:  %{time_connect}\n
    time_appconnect:  %{time_appconnect}\n
   time_pretransfer:  %{time_pretransfer}\n
      time_redirect:  %{time_redirect}\n
 time_starttransfer:  %{time_starttransfer}\n
                    ----------\n
         time_total:  %{time_total}\n

发送请求:

curl -w "@curl-format.txt" -o /dev/null -s "http://www.baidu.com/"
返回结果
    time_namelookup:  0.061
       time_connect:  0.092
    time_appconnect:  0.000
   time_pretransfer:  0.092
      time_redirect:  0.000
 time_starttransfer:  0.126
                    ----------
         time_total:  0.126
原文:https://blog.josephscott.org/2011/10/14/timing-details-with-curl/
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。