亚洲好骚综合-亚洲黄色录像-亚洲黄色网址-亚洲黄色网址大全-99久久99久久-99久久99久久精品国产

您的位置:軟件測試 > 開源軟件測試 > 開源性能測試工具 >
開源性能測試工具 - Apache ab 介紹
作者:網絡轉載 發布時間:[ 2013/12/11 11:40:07 ] 推薦標簽:

服務器負載太大而影響程序效率也是很常見的,Apache服務器自帶有一個叫AB(ApacheBench)的工具,在bin目錄下。使用這個輕巧的工具我們可以對服務器進行負載測試,

基本用法:

ab -n 全部請求數 -c 并發數 測試url

例:ab -n 1000 -c 50 http://www.test.com/t.php

得到結果類似于(后面顏色字為中文翻譯):

Server Software:        Apache/2.0.55
Server Hostname:        localhost
Server Port:            80

Document Path:          /1.php
Document Length:        82522 bytes #請求文檔大小

Concurrency Level:      50           #并發數
Time taken for tests:   92.76140 seconds#全部請求完成耗時
Complete requests:      10000         #全部請求數
Failed requests:        1974          #失敗的請求
   (Connect: 0, Length: 1974, Exceptions: 0)
Write errors:           0
Total transferred:      827019400 bytes#總傳輸大小
HTML transferred:       825219400 bytes
Requests per second:    108.61 [#/sec] (mean)#每秒請求數(平均)
Time per request:       460.381 [ms] (mean)#每次并發請求時間(所有并發)
Time per request:       9.208 [ms] (mean, across all concurrent requests)                              #每一請求時間(并發平均) 
Transfer rate:          8771.39 [Kbytes/sec] received#傳輸速率

Connection Times (ms)#連接時間
              min  mean[+/-sd] median   max
Connect(#連接):        0    0   2.1      0      46
Processing(#處理):    31  458  94.7    438    1078
Waiting(#等待):       15  437  87.5    422     938
Total:         31  458  94.7    438    1078

完整用法:

ab[ -Aauth-username:password] [ -cconcurrency] [ -Ccookie-name=value] [ -d] [ -ecsv-file] [ -ggnuplot-file] [ -h] [ -Hcustom-header] [ -i] [ -k] [ -nrequests] [ -pPOST-file] [ -Pproxy-auth-username:password] [ -q] [ -s] [ -S] [ -ttimelimit] [ -Tcontent-type] [ -vverbosity] [ -V] [ -w] [ -x<table>-attributes] [ -Xproxy[:port] ] [ -y<tr>-attributes] [ -z<td>-attributes] [http://]hostname[:port]/path

參數說明如下:

  -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 HTMLtables
  -i               Use HEAD instead of GET
  -x attributes    String to insert as table attributes
  -y attributes    String to insert as tr attributes
  -z attributes    String to insert as td or th attributes
  -C attribute     Add cookie, eg. 'Apache=1234. (repeatable)
  -H attribute     Add Arbitrary header line, eg. 'Accept-Encoding: gzip'
                 Inserted after all normal header lines. (repeatable)
  -A attribute     Add Basic WWW Authentication, the attributes
                 are a colon separated username and password.
  -P attribute     Add Basic Proxy Authentication, the attributes
                 are a colon separated username and password.
  -X proxy:port    Proxyserver and port number to use
  -V               Print version number and exit
  -k               Use HTTP KeepAlive feature
  -d               Do not show percentiles served table.
  -S               Do not show confidence estimators and warnings.
  -g filename      Output collected data to gnuplot format file.
  -e filename      Output CSV file with percentages served
  -h               Display usage information (this message)

軟件測試工具 | 聯系我們 | 投訴建議 | 誠聘英才 | 申請使用列表 | 網站地圖
滬ICP備07036474 2003-2017 版權所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd
主站蜘蛛池模板: 成 人 黄 色视频免费播放 | 国产日本在线播放 | 黄色大片免费网站 | 中文字幕一精品亚洲无线一区 | 天堂中文资源网 | 亚洲免费资源 | 国产日韩欧美综合 | 在线观看免费黄色小视频 | 伦理片在线观看网站资源 | 精品国产拍拍拍无遮挡 | 成年男女免费视频观看性 | 精品福利一区 | 日韩国产欧美一区二区三区 | 欧美高清一区二区 | 国产白丝丝高跟在线观看 | 在线观看精品视频网站www | 男女男精品视频网站在线观看 | 久久久久国产精品免费看 | 五月综合激情久久婷婷 | 无边泳池在线观看 | 国精品在亚洲_欧美 | 无遮挡一级毛片视频 | 韩国免费一级成人毛片 | 国产欧美日韩在线播放 | 国产日本在线观看 | 黄色片免费观看视频 | 国产理伦| 日本高清网站 | 国产成人高清视频免费播放 | 日本理论午夜中文字幕第一页 | 免费一级α片在线观看 | 噜噜噜天天躁狠狠躁夜夜精品 | 欧美成人性视频在线黑白配 | 欧美大片国产在线永久播放 | 亚洲国产成a人v在线观看 | 影音先锋国产系列精品 | 精品在线视频播放 | 精品哟哟哟国产在线观看不卡 | 国产一区免费在线观看 | 在线视频一区二区日韩国产 | 污污视频在线免费看 |