使用httpstat测试网站响应时间

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

输出:
image.png

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

更多信息,查看帮助:

$ man curl
$ python httpstat.py -h

来源:http://blog.topspeedsnail.com/archives/10732#more-10732

猜你喜欢

转载自blog.csdn.net/xc_zhou/article/details/86702179