ab apache Benchmarking中链接的写法 记得加上/

C:\wamp\bin\apache\Apache2.2.21\bin>ab.exe -n5 -c5 http://www.baidu.com
ab.exe: invalid URL
Usage: ab.exe [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
    -b windowsize   Size of TCP send/receive buffer, in bytes
    -p postfile     File containing data to POST. Remember also to set -T
    -u putfile      File containing data to PUT. Remember also to set -T
    -T content-type Content-type header for POSTing, eg.
                    ‘application/x-www-form-urlencoded‘
                    Default is ‘text/plain‘
    -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
    -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
    -r              Don‘t exit on socket receive errors.
    -h              Display usage information (this message)

记得要在最后面加上/

C:\wamp\bin\apache\Apache2.2.21\bin>ab.exe -n5 -c5 http://www.baidu.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.baidu.com (be patient).....done


Server Software:        BWS/1.1
Server Hostname:        www.baidu.com
Server Port:            80

Document Path:          /
Document Length:        77593 bytes

Concurrency Level:      5
Time taken for tests:   0.686 seconds
Complete requests:      5
Failed requests:        4
   (Connect: 0, Receive: 0, Length: 4, Exceptions: 0)
Write errors:           0
Total transferred:      392317 bytes
HTML transferred:       387997 bytes
Requests per second:    7.29 [#/sec] (mean)
Time per request:       686.039 [ms] (mean)
Time per request:       137.208 [ms] (mean, across all concurrent requests)
Transfer rate:          558.46 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       54   63   7.4     66      71
Processing:   228  360 100.7    402     475
Waiting:       70  152  75.5    159     262
Total:        284  423 103.9    463     546

Percentage of the requests served within a certain time (ms)
  50%    439
  66%    487
  75%    487
  80%    546
  90%    546
  95%    546
  98%    546
  99%    546
 100%    546 (longest request)

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。