ab性能测试工具

以请求百度为例:http://httpd.apache.org/docs/2.4/programs/ab.html 详细说明见官网
ab命令同时满足http及https的请求
常用请求参数:-n请求次数,-c并发数
Wx-MacBookPro:apache2 wuxi$ ab -n 100 -c 10 https://www.baidu.com/
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
//apache版本信息
Benchmarking www.baidu.com (be patient).....done


Server Software: BWS/1.1
//请求返回header类型,可能是nginx、apache、IIs等
Server Hostname: www.baidu.com
//请求ip或者域名
Server Port: 443
//请求端口,当前请求为https所以端口为443,请求https端口80
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
//https端口协议
TLS Server Name: www.baidu.com

Document Path: /
//路径
Document Length: 227 bytes
//第一个成功返回的文档的字节大小
Concurrency Level: 10
//并发数!!!
Time taken for tests: 1.034 seconds
//从建立连接到最后接受完成总时间
Complete requests: 100
//总请求数成功的
Failed requests: 0
//失败的
Total transferred: 87200 bytes
//从服务器接收的字节总数
HTML transferred: 22700 bytes
//HTML接收字节数
Requests per second: 96.75 [#/sec] (mean)
————每秒请求数(总请求数/总时间)
Time per request: 103.359 [ms] (mean)
————用户平均请求等待时间=concurrency * timetaken * 1000 / done
参考Jmeter、LR中的平均响应时间
Time per request: 10.336 [ms] (mean, across all concurrent requests)
————服务器处理每个请求平均响应时间=timetaken * 1000 / done
Transfer rate: 82.39 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 41 75 16.1 74 121
Processing: 10 23 12.7 19 63
Waiting: 10 21 10.8 18 54
Total: 62 99 18.5 97 168
//网络连接情况
Percentage of the requests served within a certain time (ms)
50% 97
66% 104
75% 107
80% 110
90% 126
95% 138
98% 148
99% 168
100% 168 (longest request)
//整体响应时间的分布比
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值