1.释义
Web压力测试工具
2.系统帮助
ab: wrong number of arguments Usage: ab [options] [http[s]://]hostname[:port]/path Options are: -n requests 要执行的请求次数 -c concurrency 并发请求数 -t timelimit Seconds to max. to spend on benchmarking This implies -n 50000 -s timeout Seconds to max. wait for each response Default is 30 seconds -b windowsize Size of TCP send/receive buffer, in bytes -B address Address to bind to when making outgoing connections -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 to use for POST/PUT data, 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. -q Do not show progress when doing more than 150 requests -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) -Z ciphersuite Specify SSL/TLS cipher suite (See openssl ciphers) -f protocol Specify SSL/TLS protocol (SSL3, TLS1, TLS1.1, TLS1.2 or ALL)
3.示例
3.1.压力测试
[root@itbkz ~]#ab -c 100 -n 100 https://www.baidu.com/ This is ApacheBench, Version 2.3 <$Revision: 1430300 $> 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: 443 SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128 Document Path: / Document Length: 227 bytes Concurrency Level: 100 Time taken for tests: 0.417 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 108175 bytes HTML transferred: 22700 bytes Requests per second: 239.94 [#/sec] (mean) Time per request: 416.765 [ms] (mean) Time per request: 4.168 [ms] (mean, across all concurrent requests) Transfer rate: 253.48 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 38 205 60.0 251 265 Processing: 22 68 56.2 24 231 Waiting: 11 58 52.0 20 231 Total: 63 273 23.6 274 365 Percentage of the requests served within a certain time (ms) 50% 274 66% 275 75% 276 80% 276 90% 280 95% 286 98% 292 99% 365 100% 365 (longest request)
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://hqyman.cn/post/1588.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
打赏
微信支付宝扫一扫,打赏作者吧~
休息一下~~