ab——Apache自带的Web性能测试工具[可以用于Nginx等任何Web]
2014-08-23 15:15
471 查看
$ ab -h Usage: ab [options] [http[s]://]hostname[:port]/path Options are: -n requests Number of requests to perform -c concurrency Number of multiple requests to make at a time -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 -l Accept variable document length (use this for dynamic pages) -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)
$ ab -n 5000 -c 100 http://localhost/ This is ApacheBench, Version 2.3 <$Revision: 1528965 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 500 requests Completed 1000 requests Completed 1500 requests Completed 2000 requests Completed 2500 requests Completed 3000 requests Completed 3500 requests Completed 4000 requests Completed 4500 requests Completed 5000 requests Finished 5000 requests Server Software: nginx/1.4.6 Server Hostname: localhost Server Port: 80 Document Path: / Document Length: 612 bytes Concurrency Level: 100 Time taken for tests: 1.212 seconds Complete requests: 5000 Failed requests: 0 Total transferred: 4265000 bytes HTML transferred: 3060000 bytes Requests per second: 4124.92 [#/sec] (mean) Time per request: 24.243 [ms] (mean) Time per request: 0.242 [ms] (mean, across all concurrent requests) Transfer rate: 3436.09 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 1 3.6 0 37 Processing: 4 23 7.5 21 55 Waiting: 1 23 7.2 21 55 Total: 12 24 7.1 22 55 Percentage of the requests served within a certain time (ms) 50% 22 66% 24 75% 26 80% 29 90% 34 95% 37 98% 49 99% 52 100% 55 (longest request)
相关文章推荐
- apache自带性能测试工具ab
- Apache自带的性能测试工具ab的使用
- Apache自带的性能测试工具ab的使用
- 使用apache自带的ab压力测试工具测试网站性能
- apache ab性能测试工具的使用(Web并发测试)
- Apache自带ab性能测试工具学习(转自jesse的博客以供以后查询)
- 网站压力测试方法- Apache自带的性能测试工具ab的使用
- apache 自带 ab.exe 性能测试工具使用
- java web开发总结(四):apache自带压力测试小工具ab(apache benchmark)
- Apache自带性能测试工具ab的使用
- Web性能压力测试工具之Apache AB 详解
- 三种web性能压力测试工具http_load webbench ab小结
- 三种web性能压力测试工具http_load webbench ab小结
- Apache自带网站压力测试工具ab
- 开源性能测试工具 - Apache ab 介绍
- Web服务器性能/压力测试工具http_load、webbench、ab、Siege使用教程
- 开源性能测试工具 - Apache ab 介绍
- 开源性能测试工具 - ApacheBench(简称ab) 介绍
- Web服务器性能/压力测试工具http_load、webbench、ab、Siege使用教程
- Web服务器性能/压力测试工具http_load、webbench、ab、Siege使用教程