zoukankan      html  css  js  c++  java
  • curl 查看接口的网络分段响应时间

    示例如下

    curl -o /dev/null -s -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_download}"
    " -X POST --data 'login=xxxxx&password=xxxxx' https://xxxxx.com/login
    

    参数解释:
    -o:把curl 返回的html、js 写到垃圾回收站[ /dev/null]

    -s:去掉所有状态

    -w:按照后面的格式写出rt

    time_namelookup:DNS 解析域名xxx.com的时间,单位是s

    time_commect:client和server端建立TCP 连接的时间,里面包括DNS解析的时间

    time_starttransfer:从client发出请求;到web的server 响应第一个字节的时间,包括前面的2个时间

    time_total:client发出请求;到web的server发送会所有的相应数据的时间,包括关闭connect的时间

    speed_download:下载速度 单位 byte/s

  • 相关阅读:
    (一)Sturts2概述
    day18,常用的模块,os,sys...等
    day17,模块的导入
    day16
    day15
    day14
    day13
    day12
    day11
    day10
  • 原文地址:https://www.cnblogs.com/byron0918/p/10342931.html
Copyright © 2011-2022 走看看