Jmeter html 报告中添加90% line time
转载南风_real博客园:http://www.cnblogs.com/jaychang/p/5784882.html
首先上效果图:
其次明白几个原理:
- 90% Line的意思是:一组数由小到大进行排列,找到它的第90%个数;
- Jmeter html报告生成是使用xxx.jtl文件通过xsl模板生成的,因此要在html报告中显示90% line,就需要修改xsl模板文件(jmeter-results-detail-report_21.xsl)
最后上步骤:
1、在jmeter-results-detail-report_21.xsl添加xsl template,可以放在max template模板下面,如下
<!-- 90% line time -->
<xsl:template name="lineTime">
<xsl:param name="nodes" select="/.." />
<xsl:choose>
<xsl:when test="not($nodes)">NaN</xsl:when>
<xsl:otherwise>
<xsl:for-each select="$nodes">
<xsl:sort data-type="number" />
<!-- last() 返回当前上下文中的最后一个节点位置数 -->
<!-- floor(number) 返回不大于number的最大整数 -->
<!-- position() 返回当前节点位置的数字 -->
<!-- number(object) 使对象转换成数字 -->
<xsl:if test="position() = floor(last()*0.9)">
<xsl:value-of select="number(.)" />
</xsl:if>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
2、在Summary中添加90% Line
<xsl:template name="summary">
<h2>Summary</h2>
<table align="center" class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th># Samples</th>
...省略N行,添加总结框中的90% Line标题...
<th>90% Line</th>
</tr>
...省略N行,添加一个xsl变量...
<!-- New add 90% line -->
<xsl:variable name="allLineTime">
<xsl:call-template name="lineTime">
<xsl:with-param name="nodes" select="/testResults/*/@t" />
</xsl:call-template>
</xsl:variable>
...省略N行,在表格中显示数字...
<td align="center">
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="$allLineTime" />
</xsl:call-template>
</td>
3、在pagelist中添加90% Line
<xsl:template name="pagelist">
<h2>Pages</h2>
<table align="center" class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th>URL</th>
...省略N行,添加Pages中的90% Line标题...
<th>90% Line</th>
<th></th>
...省略N行,添加一个xsl变量...
<!-- new add 90% line time -->
<xsl:variable name="nintyTime">
<xsl:call-template name="lineTime">
<xsl:with-param name="nodes" select="../*[@lb = current()/@lb]/@t" />
</xsl:call-template>
</xsl:variable>
...在表格中显示数字...
<td align="center">
<xsl:call-template name="display-time">
<xsl:with-param name="value" select="$nintyTime" />
</xsl:call-template>
</td>
Jmeter html 报告中添加90% line time的更多相关文章
- jmeter+ant+jenkins+mac报告优化(二):添加90% Line和QPS
一.优化内容 1.Summary中只标红Failures数 2.Pages页面按Average Time倒序排序 3.Average Time超过2s标黄显示 4.Pagelist 模块中针对错误和超 ...
- Jmeter+Jenkins的HTML报告中添加QPS、90%栏目显示
1.进入jmeter/extras目录,修改 jmeter-results-detail-report_21.xsl 2.打开文件 在summary部分修改如下: 在pagelist部分修改如下: ...
- Jmeter+Jenkins的聚合报告中添加QPS栏目显示
1.进入jmeter/extras目录,修改 jmeter-results-detail-report_21.xsl 2.打开文件修改 如上所示,在文件中添加6个地方关于QPS的显示即可, 然后替 ...
- JMeter专题系列(七)聚合报告之 90% Line
JMeter 官网原文: 90% Line - 90% of the samples took no more than this time. The remaining samples at lea ...
- Jmeter Html 报告优化
转载自南风_real博客园:http://www.cnblogs.com/jaychang/p/5881525.html 但是最近在查阅相关资料时,发现基本都是重复一篇文章Jmeter使用笔记之htm ...
- Jmeter 请求参数中包含 MD5 加密的密码
如何在jmeter中对参数进行加密 使用工具:java+myeclipse 让开发将他的加密类从eclipse中导出来打成jar包,放在jmeter安装文件夹lib文件夹中%JMETER HOME%\ ...
- JMeter 聚合报告之 90% Line 参数说明
其实要说明这个参数的含义非常简单,可能你早就知道他的含义,但我对这个参数一直有误解,而且还一直以为是"真理",原于一次面试,被问到了这个问题,所以引起我这个参数的重新认识. 先说说 ...
- JMeter笔记3:聚合报告之90%Line参数说明
看看JMeter 官网是怎么说的? 90% Line - 90% of the samples took no more than this time. The remaining samples a ...
- JMeter学习(七)聚合报告之 90% Line 正确理解(转载)
转载自 http://www.cnblogs.com/yangxia-test 90% Line 参数正确的含义: 虽然,我的上面理解有一定的道理,显然它是错误的.那看看JMeter 官网是怎么说的? ...
随机推荐
- Android调用系统分享功能以及createChooser的使用
工程结构 //效果图 点击测试分享 ...
- Xcode 7安装KSImageNamed失败解决方法
## How do I use it? Build the KSImageNamed target in the Xcode project and the plug-in will automati ...
- shell之并行
http://my.oschina.net/enyo/blog/271612 GNU Parallel指南 http://www.gnu.org/software/parallel/parallel_ ...
- maxscript,#号和$号
一,#号: 1,数组 #(123, "hi") 2,系统目录 fileName = getDir #scripts + "\\xxx.ms" 二,$号 节点路径 ...
- 7 款开源 Java 反编译工具
今天我们要来分享一些关于Java的反编译工具,反编译听起来是一个非常高上大的技术词汇,通俗的说,反编译是一个对目标可执行程序进行逆向分析,从而得到原始代码的过程.尤其是像.NET.Java这样的运行在 ...
- final,static
如果输入参数在方法体执行过程中,强制不能被修改,那么参数类型前加final比较安全. final修饰的函数会被编译器优化,优化意味着编译器可能将该方法用内联(inline)方式载入.final修饰变量 ...
- mysqlbinlog快速遍历搜索记录 (转)
目标,开发人员说有个数据莫名其妙添加了,但是不知道是从哪里添加的,而且应用功能里面不应该添加这样的数据,为了查清楚来源,所 以我就准备去binlog里面找了,但是binlog有好几个月的数,我这样一个 ...
- R提高篇(五): 描述性统计分析
数据作为信息的载体,要分析数据中包含的主要信息,即要分析数据的主要特征(即数据的数字特征), 对于数据的数字特征, 包含数据的集中位置.分散程度和数据分布,常用统计项目如下: 集中趋势统计量: 均值 ...
- [Hibernate] - Load and Get
Hibernate中使用session的load(...)和get(...)区别: 1.load()方法是在返回的类被后期调用时,才会去提交SQL查询数据库. 2.get()方法是在调用get()时就 ...
- UI—代理简单使用
代理:又叫委托 通俗的说是自己不能办的事 委托给别人去办.比如UITextField,UIAlertView都使用了代理 写代理的步骤: 1.声明代理里面的协议方法(@protocl) 2.声明协议的 ...