Apache自帶的性能測試工具ab的使用
小弟在學(xué)校負責一個(gè)測試團隊,為學(xué)校的項目做測試,其間有些膚淺的作品,還請各位前輩多多指導^__^
1 概述
ab(ApacheBench)是Apache自帶的超文本傳輸協(xié)議(HTTP)性能測試工具。 其設計意圖是描繪當前所安裝的Apache的執行性能, 主要是顯示你安裝的Apache每秒可以處理多少個(gè)請求。
2 使用
2.1 安裝
Apache服務(wù)器套件自帶ab,只要安裝Apache即可,無(wú)需另行安裝ab。ab位于%ApacheHome%/bin目錄下(“%ApacheHome%”為Aapche安裝路徑),你也可以把ab.exe文件copy出來(lái),獨立使用。
2.2 參數列表
C:\>ab
ab: wrong number of arguments
Usage: ab [options] [http://]hostname[:port]/path
Options are:
-n requests Number of requests to perform
-c concurrency Number of multiple requests to make
-t timelimit Seconds to max. wait for responses
-p postfile File containing data to POST
-T content-type Content-type header for POSTing
-v verbosity How much troubleshooting info to print
-w Print out results in HTML tables
-i Use HEAD instead of GET
-x attributes String to insert as table attributes
文章來(lái)源于領(lǐng)測軟件測試網(wǎng) http://kjueaiud.com/