下载地址
解压
查看版本
D:\Developer\httpd-2.4.33-win64-VC15\Apache24\binλ ab -VThis 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/testThis 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 requestsCompleted 200 requestsCompleted 300 requestsCompleted 400 requestsCompleted 500 requestsCompleted 600 requestsCompleted 700 requestsCompleted 800 requestsCompleted 900 requestsCompleted 1000 requestsFinished 1000 requestsServer Software:Server Hostname: localhostServer Port: 8080Document Path: /testDocument Length: 4 bytesConcurrency Level: 50Time taken for tests: 0.322 secondsComplete requests: 1000Failed requests: 0Total transferred: 136000 bytesHTML transferred: 4000 bytesRequests 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] receivedConnection Times (ms) min mean[+/-sd] median maxConnect: 0 0 0.4 0 1Processing: 1 15 12.9 13 102Waiting: 1 12 12.3 9 98Total: 1 16 12.9 13 103Percentage 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