下面最后加上url即可, 也可以通过测速站点测试https://www.17ce.com/
CURL测速
1 | curl -o /dev/null -w "\n DNS 解析域名的时间\n namelookup:"%{time_namelookup}"\n client和server端建立TCP 连接的时间\n time_connect:"%{time_connect}"\n 从client发出请求;到web的server 响应第一个字节的时间\n time_starttransfer:"%{time_starttransfer}"\n client发出请求;到web的server发送会所有的相应数据的时间\n time_total:"%{time_total}"\n 下载速度 单位 byte/s\n speed_download(byte/s):"%{speed_download}"\n" |
CURL命令测试网站打开速度
1 | root@web:/var/www/# curl -o /dev/null -s -w %{time_namelookup}:%{time_connect}:%{time_starttransfer}:%{time_total} http://www.baidu.com |
更多curl的用法见:https://www.cnblogs.com/fan-yuan/p/9182902.html
wget测速
1 | wget -O /dev/null |
ab测速
1 | ab -n 1000 -c 50-k -p ./getByLocation.data -H "referer: https://servicewechat.com/*/devtools/page-frame.html" -T "application/json" -H "Content-Type: application/json" "https://c-mini.*.com/ads/application" |
执行脚本
1 | #!/bin/bash |
输出
1 | 1.拉流接口 |
本文作者:
ionluo
本文链接: http://www.ionluo.cn/blog/posts/139c023f.html
版权声明: 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。转载请注明出处!
本文链接: http://www.ionluo.cn/blog/posts/139c023f.html
版权声明: 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。转载请注明出处!