广告联盟网

 找回密码
 注册
查看: 588|回复: 7
打印 上一主题 下一主题

用 cURL to 测试你站点的响应时间

[复制链接]
跳转到指定楼层
1#
发表于 2007-7-13 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
#curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total}&nbsp; &nbsp; <a href="http://www.400hosting.com" target="_blank">http://www.400hosting.com</a><br /><br />0.876:0.894:0.907&nbsp;&nbsp;// 这个返回的结果<br /><br />解释下上面三个参数的意思:<br />ime_connect&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;The time it takes to establish the TCP connection to the server<br />time_starttransfer&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;The time it takes for the Web server to return the first byte of data after the request is issued<br />time_total&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; The time it takes to complete the request<br /><br />转自IBM<br /><a href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-1/index.html" target="_blank">http://www.ibm.com/developerwork ... e-lamp-1/index.html</a><br /><br />[<i> 本帖最后由 400hosting 于 2007-7-13 15:15 编辑 </i>]
2#
发表于 2007-7-13 | 只看该作者
啥?
3#
 楼主| 发表于 2007-7-13 | 只看该作者
在linux 下使用 上面那个命令,测试你的站点的影响速度
4#
发表于 2007-7-13 | 只看该作者
0.474:0.515:0.515
5#
发表于 2007-7-13 | 只看该作者
<br><br><div class="msgbody"><div class="msgheader">QUOTE:</div><div class="msgborder">原帖由 <i>mail23</i> 于 2007-7-13 15:16 发表 <a href="http://www.im286.com/redirect.php?goto=findpost&amp;pid=20526067&amp;ptid=2064871" target="_blank"><img src="http://www.im286.com/images/common/back.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://www.im286.com/images/common/back.gif');}" onmousewheel="return imgzoom(this);" alt="" /></a><br />0.474:0.515:0.515 </div></div><br>是DreamHost的
6#
 楼主| 发表于 2007-7-13 | 只看该作者
上面的朋友测试的似乎他是在本地读取的信息我是从远程服务器上读的。<br /><br />[root@lin1 ~]# curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total}&nbsp; &nbsp; <a href="http://www.400hosting.com" target="_blank">http://www.400hosting.com</a><br />3.393:3.398:3.728[root@lin1 ~]# <br />[root@lin1 ~]# curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total}&nbsp; &nbsp; <a href="http://www.400hosting.com" target="_blank">http://www.400hosting.com</a><br />0.028:0.032:0.362[root@lin1 ~]# <br /><br />在西安测试<br />这个是CDN的效果,第二个和第一个明显就少了很多或者本地cookies的作用。<br /><br />有没有人听过8秒定律啊,就是站点如果超出8秒的话,别人就已经等的很不耐烦了。
7#
 楼主| 发表于 2007-7-13 | 只看该作者
[root@lin1 ~]# curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total}&nbsp; &nbsp; <a href="http://www.sohu.com" target="_blank">http://www.sohu.com</a><br />8.136:8.143:8.228[root@lin1 ~]# <br />[root@lin1 ~]# curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total}&nbsp; &nbsp; <a href="http://www.163.com" target="_blank">http://www.163.com</a><br />0.418:0.445:0.795[root@lin1 ~]# <br /><br />看来sohu 已经让我们等的不耐烦了。163很快
8#
发表于 2007-7-13 | 只看该作者
[root@localhost upimg]# curl -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} <a href="http://www.yqxs8.cn" target="_blank">www.yqxs8.cn</a><br />0.078:0.093:0.153[root@localhost upimg]# <br /><br />很快啊,哈哈,上海的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|广告联盟网  

GMT, 2024-9-30 , Processed in 0.072471 second(s), 19 queries .

Powered by Discuz! X3.2

© 2005-2021 www.ggads.com GGADS 广告联盟网

快速回复 返回顶部 返回列表