HTTP性能测试(apache ab)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/laohoubin/article/details/47700507

使用Apache ab 做网站的性能测试,下边是测试结果分析:
安装Apache ab 后,可以在CMD输入ab -n1000 -c10 http://101.200../来测试想要测试的站点。

D:\Program Files (x86)\apache ab>ab -n1000 -c10 http://101.200.*.*/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 101.200.*.* (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache-Coyote/1.1
Server Hostname:        101.200.*.*  ##请求主机
Server Port:            80          ##请求端口

Document Path:          /       ##请求URL地址
Document Length:        714 bytes ##http响应正文的长度

Concurrency Level:      10       ##并发数
Time taken for tests:   36.495 seconds   ##所有请求完成时间
Complete requests:      1000         ##完成请求数量
Failed requests:        1            ##失败的请求数量
   (Connect: 1, Receive: 0, Length: 0, Exceptions: 0)
Write errors:           0
Total transferred:      1024070 bytes      ##整个过程中网络传输量
HTML transferred:       714000 bytes       ##整个过程HTML传输量
Requests per second:    27.40 [#/sec] (mean)  ##重要指标,服务器吞吐率
Time per request:       364.949 [ms] (mean)   ##用户平均请求等待时间
Time per request:       36.495 [ms] (mean, across all concurrent requests)   ##每个平均请求实际运行平均值
Transfer rate:          27.40 [Kbytes/sec] received  ##表示请求单位时间内流量

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        3   14 164.1      6    3009
Processing:     7  327 2036.4     56   21064
Waiting:        5  223 1784.8     33   21057
Total:         14  341 2041.8     62   21070

##统计用户等待时间
Percentage of the requests served within a certain time (ms)
  50%     62
  66%     64
  75%     66
  80%     66
  90%     71
  95%     75
  98%   3064
  99%   3350
 100%  21070 (longest request)

此为学习笔记

猜你喜欢

转载自blog.csdn.net/laohoubin/article/details/47700507