下载地址
https://www.apachelounge.com/download/
解压
查看版本
D:\Developer\httpd-2.4.33-win64-VC15\Apache24\bin
λ ab -V
This is ApacheBench, Version 2.3 <$Revision: 1826891 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
使用
D:\Developer\httpd-2.4.33-win64-VC15\Apache24\bin
λ ab -n 1000 -c 50 http://localhost:8080/test
This is ApacheBench, Version 2.3 <$Revision: 1826891 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (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:
Server Hostname: localhost
Server Port: 8080
Document Path: /test
Document Length: 4 bytes
Concurrency Level: 50
Time taken for tests: 0.322 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 136000 bytes
HTML transferred: 4000 bytes
Requests per second: 3105.42 [#/sec] (mean)
Time per request: 16.101 [ms] (mean)
Time per request: 0.322 [ms] (mean, across all concurrent requests)
Transfer rate: 412.44 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 1
Processing: 1 15 12.9 13 102
Waiting: 1 12 12.3 9 98
Total: 1 16 12.9 13 103
Percentage of the requests served within a certain time (ms)
50% 13
66% 13
75% 14
80% 14
90% 16
95% 47
98% 73
99% 80
100% 103 (longest request)
命令解释
ab -n 1000 -c 50 http://localhost:8080/test
-n 1000:本次测试总数为1000
-c 50:本次请求并发数50