美文网首页
使用httpstat测试网站响应时间

使用httpstat测试网站响应时间

作者: Python数据分析实战 | 来源:发表于2018-07-13 09:59 被阅读47次

httpstat是用Python写的脚本,可以用来测试http服务器的回应速度。 httpstat本质上就是封装了cURL工具,所以它可以接受各种 cURL的选项。(-w、-D、-o、-s与-S除外,因为这些已经被 httpstat使用了)

安装httpstat
下载脚本:

$ wget -c https://raw.githubusercontent.com/reorx/httpstat/master/httpstat.py

或使用pip安装:

$ pip install httpstat

使用httpstat测试网站响应时间

$ python httpstat.py blog.topspeedsnail.com
# 或
$ httpstat blog.topspeedsnail.com
输出: 输出

从上图输出我们就可以大约看出网站在哪个环节耗时最多。

更多信息,查看帮助:

$ man curl
$ python httpstat.py -h

相关文章

网友评论

      本文标题:使用httpstat测试网站响应时间

      本文链接:https://www.haomeiwen.com/subject/qpxjpftx.html