AB测试结果分析

news/2024/7/4 15:28:13

 AB测试,200个请求,20个并发.这样的测试强度,CPU占了70-80%,w3p占用了70多M内存,本想多测几次,看看它的内存会不会涨上去,没 有测试机器没办法,开发机要干活.我估计CPU就有问题了,性能有好些个地方还需要优化.

顺便把测试的工具用法作个记号

基本用法 :
ab -n
  全部请求数  -c  并发数  测试 url
:ab -n 1000 -c 50 http://www.newdev.gztest.com /
Server Software:        
 Microsoft-IIS/7.0
Server Hostname:       
  www.newdev.gztest.com
Server Port:            80
Document Path:         
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
  //整个场 景中的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时间乘以并发请求数。

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)


[原文:http://blog.sina.com.cn/s/blog_46d93f190100hev8.html] 



http://www.niftyadmin.cn/n/2266058.html

相关文章

夺命雷公狗---DEDECMS----20dedecms取出栏目页对应的内容

取出栏目页对应的内容 现在我们的栏目页面是可以完全正常跳转了,那么我们现在需要完成的就是让他的内容全部(电影,连续剧,综艺)分类的显示出来。 我们还是要使用{dede:arclist}标签来取出我们所需要的内容,…

Docker(一)之 应用(Application)部署容器化的演进之路

前言 容器化技术可以帮助企业更大化资源利用,同时帮助项目相关人员(开发、运维、测试、安全等)以最小的成本实现项目快速上云部署,掌握容器化管理工具Docker,就掌握了云原生最基础、最核心技术之一 应用(…

将CnetOS 6.5加入Windows域中

我相信,很多公司都有统一身份认证的需求,只是这个统一认证很多公司都没有彻底完成,比如我见到的很多企业都使用Windows AD来管理办公电脑,笔记本等运行windows操作系统的计算机,而IDC机房大多是Linux系统的服务器&…

Vue 3.x 指令整理

1.v-text(设置标签的文本值) //html: <div id"app"><h2 v-text"message!"></h2> //标签里的内容全部改变<h2>学习{{message"!"}}</h2> //推荐写法&#xff0c;标签里的内容可部分改变 </div>//js: const a…

方法的重载overload

/*方法的重载overload * 重载&#xff1a;在同一个类里可以定义一个或者一个以上的方法 * 参数类型不一致 * 参数数量不一致 * */ 1 public class Chongzai {2 String uniqueID;3 public int addNums (int a,int b){4 return ab;5 }6 publ…

《JavaScript DOM 编程艺术》知识点整理

本书重点&#xff1a;关于Javascript和DOM脚本编程工作的基本原则、良好习惯、正确思路 预留退路、循序渐进、以用户为中心 一、JavaScript简史 XHTML:可扩展超文本标记语言 BOM:浏览器对象模型&#xff08;Web浏览器窗口的高度、宽度和屏显位置等属性&#xff09; DOM:…

No1_3.数组初始化_Java学习笔记

1 public class HelloArray {2 3 public static void main(String[] args) {4 // TODO Auto-generated method stub5 6 System.out.println("HELLO HelloArray~");7 8 /*******9 * 创建一维数组****** 声明数组格式&#xff1a…

用NSCalendar和UICollectionView自定义日历,并实现签到显示

前一段时间因为工作需要实现了一个可以签到的日历&#xff0c;来记录一下实现的思路效果如图&#xff1a;这里的基本需求是&#xff1a;1&#xff0c;显示用户某个月的签到情况&#xff0c;已经签到的日子打个圈&#xff0c;没有签到且在某个时间范围内的可以签到&#xff0c;其…