加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

压测工具ab

发布时间:2020-12-15 21:52:57 所属栏目:安全 来源:网络整理
导读:? ? 1、安装ab yum install httpd-tools ? 2、使用 ab -n 2000 -c 2 http://www.cctv.com -n:总的请求数 -c:并发数 -k:是否开启长连接 ? 3、结果举例: Concurrency Level: 20 ====并发数 Time taken for tests: 37.252 seconds =====总共的时间 Complete

?

?

1、安装ab
yum install httpd-tools

?


2、使用
ab -n 2000 -c 2 http://www.cctv.com
-n:总的请求数
-c:并发数
-k:是否开启长连接

?

3、结果举例:
Concurrency Level: 20 ====>并发数
Time taken for tests: 37.252 seconds =====>总共的时间
Complete requests: 2000 ====>总请求数
Failed requests: 0
Write errors: 0
Total transferred: 637985160 bytes
HTML transferred: 637254000 bytes
Requests per second: 53.69 [#/sec] (mean) ====>服务端平均处理速率(即:总的请求数/总共的时间)
Time per request: 372.516 [ms] (mean) ===>在客户端处理单个请求所需要花费的时间
Time per request: 18.626 [ms] (mean,across all concurrent requests) ===>在服务端处理单个请求所需要花费的时间(不包含网络传输时间)
Transfer rate: 16724.98 [Kbytes/sec] received ====>网络传输带宽占用情况

Connection Times (ms) min mean[+/-sd] median maxConnect: 5 42 212.1 26 3037Processing: 23 329 89.5 321 799Waiting: 4 32 28.5 28 348Total: 29 371 231.2 348 3432

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读