可能是我的本子配置不行,服务器上连接数可以上1000
./pywebbench.py -c 1000 -t 10 http://172.16.0.38/test.php 1000 clients, running 10 sec, timeout setting 2. Requests: 7387 total ,7385 susceed, average 99%. 2 fail: timeout:1 connect refused:1 not 2xx status:0
————————————-
2010.7.14更新 可以输出更多信息,svn版本7
100 clients, running 10 sec, timeout setting 2. Requests: 1361 total ,1027 susceed, average 75%. 334 fail: timeout:254 connect refused:80 not 2xx status:0
—————————–
测试需要,特别是测试缓存,逮住一个url压没什么用,所以写了一个pywebbench满足需求
#url中的id会顺序变化 pywebbench.py -c 100 -t 10 http://test.com/xx.php?id={10000,12000000} #url中的id随机变化 pywebbench.py -c 100 -t 10 http://test.com/xx.php?id={10000,12000000#random}
实际数据
#这是pywebbench跑的数据,curl这么牛逼吗,远远把webbench落在后面。。。 $python ~/bin/pywebbench.py -c 300 -t 10 http://localhost/ 300 clients, running 10 sec. Requests: 20430 total 19318 susceed, 1112 failed. #这是webbench跑的数据 $webbench -c 300 -t 10 http://localhost/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://localhost/ 300 clients, running 10 sec. Speed=56964 pages/min, 3997446 bytes/sec. Requests: 9494 susceed, 0 failed.
已知问题:
python的线程貌似开不多,-c 500 开不了。。
下载:
http://code-of-emptyhua.googlecode.com/svn/trunk/pywebbench.py
需要安装pycurl:sudo apt-get install python-pycurl

python的线程貌似开不多,-c 500 开不了。 这个怎么解决 老大
2010年09月13日 @ 15:27