網站性能測試工具ab(Apache Bench)

進入ab.exe根目錄

ab -n 1000 -c 10 http://www.baidu.com/

ab -n 1000 -c 10 http://www.baidu.com/index.php





相關參數

-n:請求數

-c:併發數



可以測試的參數

Time taken for tests:測試用時

Requests per second: 每秒請求數

測試用時*每秒請求數=1000









# ab -n 1000 -c 20www.baidu.com/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $>apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,http://www.zeustech.net/
Copyright 1997-2005 The Apache Software Foundation,http://www.apache.org/

Benchmarking www.baidu.com (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
Finished 1000 requests


ServerSoftware: BWS/1.0
ServerHostname: www.baidu.com
ServerPort: 80

DocumentPath: /
DocumentLength: 3723 bytes

ConcurrencyLevel: 20

//測試用時

Time taken for tests: 121.445016 seconds
Completerequests: 1000
Failedrequests: 162
(Connect: 0, Length: 150,Exceptions: 12)
Writeerrors: 0
Totaltransferred: 3422950 bytes
HTMLtransferred: 3164550 bytes

//每秒請求數
Requests persecond: 8.23[#/sec] (mean)
Time perrequest: 2428.900 [ms] (mean)

//每請求數耗時
Time perrequest: 121.445 [ms] (mean, across all concurrent requests)
Transferrate: 27.52 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd]median max
Connect: 13 8103549.2 20 45020
Processing: 11 366593.3 125 8362
Waiting: 0 37107.1 19 1999
Total: 27 11773528.2 325 45049

Percentage of the requests served within a certain time(ms)
50% 325
66% 568
75% 794
80% 971
90% 3030
95% 3068
98% 9054
99% 21047
100% 45049 (longestrequest)
發佈了52 篇原創文章 · 獲贊 4 · 訪問量 2427
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章