码迷,mamicode.com
首页 > 其他好文 > 详细

ab压力测试

时间:2020-01-29 17:42:51      阅读:87      评论:0      收藏:0      [点我收藏+]

标签:pat   sts   cert   receive   lang   too   wait   ted   sdn   

一、安装:

yum -y install httpd-tools

 

二、命令

# 每次同时发送100个请求,总共1000个请求

ab -n 1000 -c 100 

# ab -k -c 100 -n 10000 http://127.0.0.1:9501/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests


Server Software:        Hyperf
Server Hostname:        127.0.0.1
Server Port:            9501

Document Path:          /
Document Length:        42 bytes

Concurrency Level:      100
Time taken for tests:   0.624 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    10000
Total transferred:      1900000 bytes
HTML transferred:       420000 bytes
Requests per second:    16020.94 [#/sec] (mean)
Time per request:       6.242 [ms] (mean)
Time per request:       0.062 [ms] (mean, across all concurrent requests)
Transfer rate:          2972.64 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    1   7.0      0     104
Processing:     0    5   4.0      4     108
Waiting:        0    5   3.8      4      37
Total:          0    6   8.4      4     127

Percentage of the requests served within a certain time (ms)
  50%      4
  66%      5
  75%      6
  80%      6
  90%     10
  95%     14
  98%     20
  99%     24
 100%    127 (longest request)

Server Software: 对方服务器网络软件和版本 比如nginx/1.8.1

Document Path:请求目录
Document Length:请求文件大小

Concurrency Level:并发量
Time taken for tests:总共花费时间
Complete requests:总共请求次数
Failed requests:请求失败次数
Total transferred:总共数据量
HTML transferred:总共html代码量
Requests per second:每秒完成的请求书 ----非常重要


参考:https://blog.csdn.net/feiwutudou/article/details/80334099

ab压力测试

标签:pat   sts   cert   receive   lang   too   wait   ted   sdn   

原文地址:https://www.cnblogs.com/cshaptx4869/p/12240657.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!