獲取網站響應時間的幾個方法

獲取網站響應時間的方法。(原創作品,轉載請務必標明文章原始出處:http://xuclv.blog.51cto.com/5503169/1300219

1:httping

簡介:

httping是個類ping的針對http request的工具。傳遞給它一個URL,它會告訴你需要多長時間來連接,發送請求,以及響應的時間等等。其可相當於web服務器的延遲+網絡的延遲。詳情:http://www.vanheusden.com/httping/

安裝:

mac:brew install httping

ubuntu:apt-get install httping

redhat/centos:http://pkgs.repoforge.org/httping/ 下載rpm包安裝: rpm –ivh PACKAGE

常用參數:

-g url 指定URl

-h hostname 代替-g,指定主機名

-p portnumber 指定端口號(with -h)

-S 顯示建立連接的時間+服務器處理及返回的時間

-s 顯示HTTP status-code (200, 404, etc.).

-G 使用GET 代替HEAD作爲資源的獲取方法,此時請求的整個page/file會被傳送

-c count 測試多少次退出

-i interval 每次探測的時間間隔

-Y Enable colors

-x proxyhost[:port] 使用一個代理服務器,這會測試包含代理服務器的延遲

更多:man httping

例:

httping -g www.baidu.com -SsG -c 10 -i 2

httping -x xxx.xxx.xxx.xxx:80 www.baidu.com -SsG -c 10 -i 2


2:curl:參考:http://curl.haxx.se/docs/manpage.html

curl -o /dev/null -s -w %{http_code}:%{http_connect}:%{time_namelookup}:%{time_connect}:%{time_pretransfer}:%{time_starttransfer}:%{time_total}:%{size_download}:%{speed_download} www.baidu.com


3:監控寶:http://www.jiankongbao.com/


4:firefox插件FireBug: http://getfirebug.com/


5:阿里測:http://alibench.com/

etc...

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章