- 浏览: 3438110 次
- 性别:
- 来自: 珠海
文章分类
- 全部博客 (1633)
- Java (250)
- Android&HTML5 (111)
- Struts (10)
- Spring (236)
- Hibernate&MyBatis (115)
- SSH (49)
- jQuery插件收集 (55)
- Javascript (145)
- PHP (77)
- REST&WebService (18)
- BIRT (27)
- .NET (7)
- Database (105)
- 设计模式 (16)
- 自动化和测试 (19)
- Maven&Ant (43)
- 工作流 (36)
- 开源应用 (156)
- 其他 (16)
- 前台&美工 (119)
- 工作积累 (0)
- OS&Docker (83)
- Python&爬虫 (28)
- 工具软件 (157)
- 问题收集 (61)
- OFbiz (6)
- noSQL (12)
最新评论
-
HEZR曾嶸:
你好博主,这个不是很理解,能解释一下嘛//左边+1,上边+1, ...
java 两字符串相似度计算算法 -
天使建站:
写得不错,可以看这里,和这里的这篇文章一起看,有 ...
jquery 遍历对象、数组、集合 -
xue88ming:
很有用,谢谢
@PathVariable映射出现错误: Name for argument type -
jnjeC:
厉害,困扰了我很久
MyBatis排序时使用order by 动态参数时需要注意,用$而不是# -
TopLongMan:
非常好,很实用啊。。
PostgreSQL递归查询实现树状结构查询
boom:go语言压力测试工具 apache ab工具的代替品 http://hao.jobbole.com/boom/
Boom 是一个把负载加到web应用上的一款小工具,它类似于ab工具,但是在各个平台上都很好安装,Boom原来是 Tarek Ziade 使用phython实现的,你可以看一下 tarekziade/boom,我使用了Go语言重写了它。
安装 https://github.com/rakyll/boom
使用例子
Usage: boom [options...] <url>
Options:
-n Number of requests to run.
-c Number of requests to run concurrently. Total number of requests cannot
be smaller than the concurency level.
-q Rate limit, in seconds (QPS).
-o Output type. If none provided, a summary is printed.
"csv" is the only supported alternative. Dumps the response
metrics in comma-seperated values format.
-m HTTP method, one of GET, POST, PUT, DELETE, HEAD, OPTIONS.
-h Custom HTTP headers, name1:value1;name2:value2.
-d HTTP request body.
-T Content-type, defaults to "text/html".
-a Basic authentication, username:password.
-allow-insecure Allow bad/expired TLS/SSL certificates.
命令例子: boom http://localhost:80 -c 10 -n 100
下面是运行结果
% boom -n 1000 -c 100 https://google.com
1000 / 1000 ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 100.00 %
Summary:
Total: 21.1307 secs.
Slowest: 2.9959 secs.
Fastest: 0.9868 secs.
Average: 2.0827 secs.
Requests/sec: 47.3246
Speed index: Hahahaha
Response time histogram:
0.987 [1] |
1.188 [2] |
1.389 [3] |
1.590 [18] |∎∎
1.790 [85] |∎∎∎∎∎∎∎∎∎∎∎
1.991 [244] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.192 [284] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.393 [304] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.594 [50] |∎∎∎∎∎∎
2.795 [5] |
2.996 [4] |
Latency distribution:
10% in 1.7607 secs.
25% in 1.9770 secs.
50% in 2.0961 secs.
75% in 2.2385 secs.
90% in 2.3681 secs.
95% in 2.4451 secs.
99% in 2.5393 secs.
Status code distribution:
[200] 1000 responses
github网址 https://github.com/rakyll/boom
ApacheBench(ab)使用简介http://phpanddb.blog.51cto.com/360884/127153
ApacheBench 主要是用来测试阿帕奇服务器执行效率用的。安装好 apache 服务器套件后,进入 bin 目录,就可以找到该可执行文件 ab.exe 。
ApacheBench 可以针对某一特定 URL 模拟出连续的联机请求,同时还可以仿真出同时间点个数相同的联机请求,因而利用 ApacheBench 可帮助我们在网站开发期间仿真实际上线可能的情况,利用仿真出来的数据做为调整服务器设定或程序的依据。
ab 用法如下
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 #同一时间发出多少个请求(并行连接)
-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 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
-s Use httpS instead of HTTP (SSL)
-h Display usage information (this message)
基本用法 :
ab -n 全部请求数 -c 并发数 测试 url
例 :ab -n 1000 -c 50 http://www.abc.com/a.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
其它参数 :
-n requests 全部请求数
-c concurrency 并发数
-t timelimit 最传等待回应时间
-p postfile POST 数据文件
-T content-type POST Content-type
-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 加入 cookie, eg. 'Apache=1234. (repeatable)
-H attribute 加入 http 头 , eg. 'Accept-Encoding: gzip'
Inserted after all normal header lines. (repeatable)
-A attribute http 验证 , 分隔传递用户名及密码
-P attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
-X proxy:port 代理服务器
-V 查看 ab 版本
-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)
Boom 是一个把负载加到web应用上的一款小工具,它类似于ab工具,但是在各个平台上都很好安装,Boom原来是 Tarek Ziade 使用phython实现的,你可以看一下 tarekziade/boom,我使用了Go语言重写了它。
安装 https://github.com/rakyll/boom
使用例子
Usage: boom [options...] <url>
Options:
-n Number of requests to run.
-c Number of requests to run concurrently. Total number of requests cannot
be smaller than the concurency level.
-q Rate limit, in seconds (QPS).
-o Output type. If none provided, a summary is printed.
"csv" is the only supported alternative. Dumps the response
metrics in comma-seperated values format.
-m HTTP method, one of GET, POST, PUT, DELETE, HEAD, OPTIONS.
-h Custom HTTP headers, name1:value1;name2:value2.
-d HTTP request body.
-T Content-type, defaults to "text/html".
-a Basic authentication, username:password.
-allow-insecure Allow bad/expired TLS/SSL certificates.
命令例子: boom http://localhost:80 -c 10 -n 100
下面是运行结果
% boom -n 1000 -c 100 https://google.com
1000 / 1000 ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎ 100.00 %
Summary:
Total: 21.1307 secs.
Slowest: 2.9959 secs.
Fastest: 0.9868 secs.
Average: 2.0827 secs.
Requests/sec: 47.3246
Speed index: Hahahaha
Response time histogram:
0.987 [1] |
1.188 [2] |
1.389 [3] |
1.590 [18] |∎∎
1.790 [85] |∎∎∎∎∎∎∎∎∎∎∎
1.991 [244] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.192 [284] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.393 [304] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.594 [50] |∎∎∎∎∎∎
2.795 [5] |
2.996 [4] |
Latency distribution:
10% in 1.7607 secs.
25% in 1.9770 secs.
50% in 2.0961 secs.
75% in 2.2385 secs.
90% in 2.3681 secs.
95% in 2.4451 secs.
99% in 2.5393 secs.
Status code distribution:
[200] 1000 responses
github网址 https://github.com/rakyll/boom
ApacheBench(ab)使用简介http://phpanddb.blog.51cto.com/360884/127153
ApacheBench 主要是用来测试阿帕奇服务器执行效率用的。安装好 apache 服务器套件后,进入 bin 目录,就可以找到该可执行文件 ab.exe 。
ApacheBench 可以针对某一特定 URL 模拟出连续的联机请求,同时还可以仿真出同时间点个数相同的联机请求,因而利用 ApacheBench 可帮助我们在网站开发期间仿真实际上线可能的情况,利用仿真出来的数据做为调整服务器设定或程序的依据。
ab 用法如下
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 #同一时间发出多少个请求(并行连接)
-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 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
-s Use httpS instead of HTTP (SSL)
-h Display usage information (this message)
基本用法 :
ab -n 全部请求数 -c 并发数 测试 url
例 :ab -n 1000 -c 50 http://www.abc.com/a.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
其它参数 :
-n requests 全部请求数
-c concurrency 并发数
-t timelimit 最传等待回应时间
-p postfile POST 数据文件
-T content-type POST Content-type
-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 加入 cookie, eg. 'Apache=1234. (repeatable)
-H attribute 加入 http 头 , eg. 'Accept-Encoding: gzip'
Inserted after all normal header lines. (repeatable)
-A attribute http 验证 , 分隔传递用户名及密码
-P attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
-X proxy:port 代理服务器
-V 查看 ab 版本
-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)
发表评论
-
FFmpeg常用基本命令
2016-07-15 11:52 0http://www.cnblogs.com/dwdxdy/p ... -
iF.SVNAdmin安装
2016-06-27 17:13 1430http://blog.linhere.com/archive ... -
apache调优
2016-05-21 10:10 1148http://my.oschina.net/renqingsh ... -
tomcat命令
2016-04-28 09:56 953./startup.sh : 启动tomcat ./shutd ... -
Shiro 基于注解和标签实现的授权认证过程
2016-04-25 13:24 5958将 Shiro 作为应用的权限 ... -
Byteman 3.0.5 发布,Java 字节码注入工具
2016-04-23 10:29 1782Byteman 3.0.5 发布,Java 字 ... -
安装Hadoop, Hbase, Phoenix
2016-04-22 09:22 1494http://my.oschina.net/jrrx/blog ... -
jenkins+ant+jmeter搭建持续集成的接口测试平台实例
2016-04-15 13:29 1582http://my.oschina.net/u/1425843 ... -
Dubbo 介绍
2016-04-14 10:26 1069官方 http://dubbo.io/ DUBBO是一个分布式 ... -
Hadoop 2.6.4分布式集群环境搭建
2016-04-13 11:45 762http://my.oschina.net/jackieyea ... -
nagios报警信息,发送到微信端
2016-03-23 22:59 1142http://www.oschina.net/code/sni ... -
Keepalived配置与使用
2016-03-23 22:53 1046原文: http://weizhifeng.net/using ... -
会话状态保持,JSESSIONID,COOKIE,URL重写
2016-03-17 20:26 1774http://my.oschina.net/sniperLi/ ... -
Intellij IDEA 根据数据库自动生成pojo和hbm
2016-03-13 17:03 2388http://my.oschina.net/jimyao/bl ... -
比较简洁的Hadoop介绍
2016-03-10 22:49 975http://www.cnblogs.com/sunddenl ... -
Intellij 配置Tomact 热部署
2016-01-28 11:19 929http://my.oschina.net/heweipo/b ... -
Java 应用发布后,需要关注的7个性能指标
2015-12-16 23:39 1137http://my.oschina.net/oneapmoff ... -
dom4j解析xml-取消doctype中DTD验证设置
2015-11-27 11:30 2253http://pengfeng.iteye.com/blog/ ... -
Linux下的压缩和解压
2015-11-10 16:13 1108Linux下的压缩(zip)解压(unzip)缩命令 http ... -
加密算法
2015-11-10 15:44 910http://my.oschina.net/u/2359500 ...
相关推荐
hey, HTTP负载生成器,ApacheBench ( ab ) 替换,以前称为 rakyll/boom 嘿,是一个小程序,向web应用程序发送一些负载。最初被称为 boom,受到Tarek工具的影响,在 tarekziade/boom 。 使用相同的名称是一个错误,...
是专门为替换我的Apache Bench用法而编写的,以提供一些缺少的功能并解决我在AB上遇到的烦恼。 我对这个工具没有特别的野心,而且由于我在Python领域还没有找到任何类似的工具,因此我编写了这个工具。 还有很多...
嘿,这是个微型程序,向Web应用程序发送一些负载。 最初被称为“繁荣”,并受Tarekziade / boom的Tarek Ziade工具的影响。 使用相同的名称是一个错误,因为它会导致二进制名称hey是一个很小的程序,该程序将一些负载...
Boom 是一个把负载加到web应用上的一款小工具,它类似于ab工具,但是在各个平台上都很好安装,Boom原来是 Tarek Ziade 使用phython实现的,是一个用Go语言实现的压力测试工具,就是和Apache Bench类似的工具。
hey 是一个向 Web 应用... 它简单、高效、高性能、功能强大,并且被设计为 Apache AB 的更现代替代品。 人们可能会问为什么要寻找其他地方? 对我来说,答案是摘要输出虽然非常酷,但对于我的用例来说有点过于简单了。