`
- 浏览:
162560 次
- 性别:
- 来自:
北京
-
ab基本用法
ab -n 全部请求数 -c 并发数 测试url
其 它参数:
-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)
结果解析
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 #整个场 景中的HTML内容传输量
Requests per second: 108.61 [#/sec] (mean) #每秒请 求数(平均)//大家最关心的指标之一,相当于 LR 中的每秒事务数,后面括 号中的 mean 表示这是一个平均值
Time per request: 460.381 [ms] (mean) #每次并发请求时间(所有并发) //大家最关心的指标之二,相当于 LR 中的平均事务响应时间, 后面括号中的 mean 表示这是一个平均值
Time per request: 9.208 [ms] (mean, across all concurrent requests) #每一请求时间(并发平均) //每个请求实际运行时间的平均值
Transfer rate: 8771.39 [Kbytes/sec] received #传输速 率//平 均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题
Percentage of the requests served within a certain time (ms)
50% 2680
66% 2806
75% 2889
80% 2996
90% 11064
95% 20161
98% 21092
99% 21417
100% 21483 (longest request)
//整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,其 中50%的用户响应时间小于2680毫秒,60% 的用户响应时间小于2806毫秒,最大的响应时间小于21417毫秒
由于对于并发请求,cpu实际上并不是同时处理的,而是按照每个 请求获得的时间片逐个轮转处理的,所以基本上第一个Time per request时间约等于第二个Time per request时间乘以并发请求数。
--------------------------------------------------------------------------------
webbench基本用法
webbench -c 并发数 -t 为时间 测试url
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便。 1、适用系统:Linux 2、编译安装: tar zxvf webbench-1.5.tar.gz cd webbench-1.5 make...
主要介绍了Web压力测试工具:http_load、webbench、ab、Siege使用教程,需要的朋友可以参考下
目前有很多免费的web压力测试工具可以帮助我们完成测试, 例如: 十个免费的Web压力测试工具http://coolshell.cn/articles/2589.html,但在真实项目中使用Apache ab和Webbench来完成压力测试。Apache的优点:Apache的...
NULL 博文链接:https://zhengdl126.iteye.com/blog/437060
SuperWebBench 是由webbench改进而来的一款简单易用的web性能测试工具背景:webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便。webbench是...
性能测试工具目前最常见的有以下几种:ab、http_load、webbench、siege。今天我们专门来介绍ab。 ab是apache自带的压力测试工具。ab非常实用,它不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的...
webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便。
在运维工作中,压力测试是一项非常重要的工作。比如在一个网站上线之前,能承受多大访问量、在大... 目前较为常见的网站压力测试工具有webbench、ab(apache bench)、tcpcopy、loadrunner。 webbench由Lionbridge公司
性能测试工具目前常见的有以下几种:ab、http_load、webbench、siege。 ab的原理: ab命令会创建多个并发访问线程,模拟多个访问者同时对某一URL地址进行访问。它的测试目标是基于URL的,因此,它既可以用来...
各种测试工具总结 Webbench、Siege、ab、http_load、JMeter mysqlslap、MySQL Benchmark Suite(sql-bench)、super-smack、Database test suite、Percona·s tpcc-mysql tool、Sysbench