TA的每日心情 | 擦汗 昨天 09:02 |
---|
签到天数: 1046 天 连续签到: 4 天 [LV.10]测试总司令
|
webbench压力测试
安装
1、下载安装包
- wget http://www.ha97.com/code/webbench-1.5.tar.gz
复制代码 2、解压安装包
- tar zxvf webbench-1.5.tar.gz
复制代码 3、安装和编译
- cd webbench-1.5
- make && make install
复制代码 错误解决方式
mkdir -m 644 -p /usr/local/man/man1
yum install ctags
webbench使用命令
webbench -c 1000 -t 30 http://www.tanwan.com/
-c是指并发数
-t是指请求时间
webbench命令结果
Speed=24920 pages/min, 21037312 bytes/sec.
Requests: 24833 susceed, 87 failed.
主要看是否有失败数(failed),有的话说明网站超过负荷了
apachebench压力测试
只要安装了apache,会自带ab压力测试
apachebench使用命令
ab -c 10 -n 100 http://www.tanwan.com/
-c是指并发数
-n是指请求总数
apachebench命令结果
Server Software: nginx/1.10.2 #服务器类型
Server Hostname: www.jiangliang738.cn #域名
Server Port: 80 #端口
Document Path: / #根目录
Document Length: 10 bytes
Concurrency Level: 10
Time taken for tests: 2.677 seconds #测试时间
Complete requests: 100 #完成的请求数量
Failed requests: 0 #失败的请求
Total transferred: 17200 bytes
HTML transferred: 1000 bytes
Requests per second: 37.36 [#/sec] (mean)
Time per request: 267.700 [ms] (mean)
Time per request: 26.770 [ms] (mean, across all concurrent requests)
Transfer rate: 6.27 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 7 26 140.0 10 1411
Processing: 11 231 414.8 93 1650
Waiting: 11 196 412.7 68 1637
Total: 20 257 434.9 104 1666
Percentage of the requests served within a certain time (ms)
50% 104 #50%的请求处理时间在100毫秒左右
66% 140
75% 146
80% 152
90% 1516
95% 1538
98% 1548
99% 1666
100% 1666 (longest request)
主要看Failed requests,不为0说明网站超过负荷了
|
|