Apache的测试工具ab(ApacheBench)源码分析
2016-09-22 11:42
459 查看
转自http://www.cnblogs.com/PursuitOnly/archive/2013/02/07/2908591.html
先看看ab总的流程图有个总体印象。
第二步ab简介
采用 apache 版本为:apache-‐2.2.22
使用:
在 ubuntu 系统下:
./ab -n 1000 -c 50 -p post.txt http://127.0.0.1:9090/query 发送 1000 个请求,每次发 50 个,post 的内容在
post.txt 里。
提要:
ab [ -A
auth-username:password ] [ -b windowsize ] [ -c
concurrency ] [ -C cookie-name=value ] [ -d ]
[ -e
csv-file ] [ -f protocol ] [ -g gnuplot-file ]
[ -h ] [ -H custom-header ] [ -i ] [ -k ] [
-n requests ] [ -p POST-file ]
[ -P proxy-auth-username:password ] [ -q ] [ -r ] [
-s ] [ -S ] [ -t timelimit ] [ -T content-type
] [ -u PUT-file ] [ -v
verbosity] [ -V ] [ -w ] [ -x <table>-attributes
] [ -X proxy[:port] ] [ -y <tr>-attributes ]
[ -z <td>-attributes ] [ -Z
ciphersuite ] [http[s]://]hostname[:port]/path
注:红色部分是不可缺少部分。
还可以修改源码添加需要的option。比如添加-D参数输出结果
比如在终端输入命令: ./ab –D 2 -n 1000 -c 100 -p postdata.txt 10.200.34.41/
第三步: ab源码分析
先看看ab总的流程图有个总体印象。
第二步ab简介
采用 apache 版本为:apache-‐2.2.22
使用:
在 ubuntu 系统下:
./ab -n 1000 -c 50 -p post.txt http://127.0.0.1:9090/query 发送 1000 个请求,每次发 50 个,post 的内容在
post.txt 里。
提要:
ab [ -A
auth-username:password ] [ -b windowsize ] [ -c
concurrency ] [ -C cookie-name=value ] [ -d ]
[ -e
csv-file ] [ -f protocol ] [ -g gnuplot-file ]
[ -h ] [ -H custom-header ] [ -i ] [ -k ] [
-n requests ] [ -p POST-file ]
[ -P proxy-auth-username:password ] [ -q ] [ -r ] [
-s ] [ -S ] [ -t timelimit ] [ -T content-type
] [ -u PUT-file ] [ -v
verbosity] [ -V ] [ -w ] [ -x <table>-attributes
] [ -X proxy[:port] ] [ -y <tr>-attributes ]
[ -z <td>-attributes ] [ -Z
ciphersuite ] [http[s]://]hostname[:port]/path
注:红色部分是不可缺少部分。
还可以修改源码添加需要的option。比如添加-D参数输出结果
比如在终端输入命令: ./ab –D 2 -n 1000 -c 100 -p postdata.txt 10.200.34.41/
第三步: ab源码分析
相关文章推荐
- AB 压力测试工具ApacheBench ab压测参数分析
- Apache服务器的性能测试工具ab 、http_load 日志分析工具webalizer
- Apache服务器的性能测试工具ab 、http_load 日志分析工具webalizer
- 开源性能测试工具 - ApacheBench(简称ab) 介绍
- Apache自带的压力测试工具――ab初体验
- Apache-ApacheBench(ab)网站压力测试
- apache自带性能测试工具ab
- 压力测试工具apache-ab讲解
- 开源性能测试工具 - Apache ab 介绍
- 三种压力测试工具 http_load 和 apache ab 、 siege 压力测试
- ab - Apache HTTP服务器性能测试工具
- HTTP压力测试工具apache的ab的使用方法
- ab --- apache自带的压力测试工具 (apache benchmark )
- Apache自带网站压力测试工具ab
- Apache压力测试工具 ab.exe
- 开源性能测试工具 - Apache ab 介绍
- Apache自带的性能测试工具ab的使用
- Apache自带的性能测试工具ab的使用
- apache 压力测试工具ab
- java web开发总结(四):apache自带压力测试小工具ab(apache benchmark)