posts - 359,comments - 0,views - 19万

ab 安装部署

yum -y install httpd-tools

 

 -c 用户数  -n 请求数

复制代码
ab -c 1000 -n 10000 http://192.168.2.38/  
# -c指定1000并发,-n指定总10000次,相当于1000个人访问10次。
# -k 是否开启长连接
Server Software:        nginx/1.8.1  #服务器信息和版本
Server Hostname:        192.168.2.38 #服务器的域名
Server Port:            80 #端口
Document Path:          / #访问的路径
Document Length:        612 bytes #文档的大小为 612 bytes(此为http响应的正文长度)
Concurrency Level:      1000 #并发请求数
Time taken for tests:   0.287 seconds #整个测试持续的时间,默认秒
Complete requests:      1000 #完成的请求数
Failed requests:        0 #失败的请求书
Write errors:           0 #网络连接写入错误数
Total transferred:      844000 bytes #传输的总数据量
HTML transferred:       612000 bytes #传输的HTML内容传输量
Requests per second:    3485.11 [#/sec] (mean) #平均每秒请求数
Time per request:       286.935 [ms] (mean) #所有用户都请求一次的平均时间
Time per request:       0.287 [ms] (mean, across all concurrent requests) #单个用户请求一次的时间
Transfer rate:          2872.49 [Kbytes/sec] received #传输速率
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   84   4.1     84      94
Processing:    86   99   6.6    100     109
Waiting:        0   83  16.2     84     108
Total:         95  183   7.4    182     195

#所有服务请求的百分比占用时间,这里50%的请求用时182ms,一般看90%的部分
Percentage of the requests served within a certain time (ms)
  50%    182
  66%    188
  75%    191
  80%    192
  90%    193
  95%    194
  98%    194
  99%    194
 100%    195 (longest request)
复制代码

 

posted on   属于我的梦,明明还在  阅读(283)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示