Ngrinder3.5.5-p1二次开发增加RT百分位

参考原文性能测试工具 nGrinder 项目剖析及二次开发 - 灰信网(软件开发博客聚合)

1、原文中需要调整的地方

        ngrinder-core模块下build.gradle依赖添加jar包

implementation (group: "org.apache.commons", name: "commons-math3", version: "3.6.1")

        PerfTest.java新增属性maxRT的getMaxRT()内需要更改为return maxRT;

2、前端代码修改位置

ngrinder3.5.5-p1版本和上述引用的版本代码发生了较大的变化,此3.5.5-p1版本前端不是基于模版而是基于vue,其他java代码按前面引用文章链接修改即可,重点说下前端需要修改的位置

 3、Report.vue修改内容

export default class Report组件增加指标

4、DetailReport.vue修改内容

<table class="table table-bordered compact-padding">节点下增加如下内容
                       <!-- liangzhilin -->
                        <!-- 新增 错误率,TPS标准差,TPS波动率,最小RT, 最大RT, RT 25/50/75/80/85/90/95/99百分位数 -->
                        <tr>
                            <th v-text="i18n('perfTest.report.errorRate')"></th>
                            <td>{{ test.errors /(test.tests + test.errors) | numFormat('0,0.00') }}</td>
                        </tr>
                        <tr>
                            <th v-text="i18n('perfTest.report.tpsStd')"></th>
                            <td>{{test.tpsStd | numFormat('0,0.00') }}</td>
                        </tr>
                        <tr>
                            <th v-text="i18n('perfTest.report.tpsVix')"></th>
                            <td>{{test.tpsVix | numFormat('0,0.00') }}</td>
                        </tr>
                        <tr>
                            <th v-text="i18n('perfTest.report.minRT')"></th>
                            <td>{{test.minRT | numFormat('0,0.00') }}</td>
                        </tr>
                        <tr>
                            <th v-text="i18n('perfTest.report.FiftyMeanTime')"></th>
                            <td>
                                <span>{{ test.fiftyMeanTime | numFormat('0,0.00') }}</span>
                                <code class="ml-1">ms</code>
                            </td>
                        </tr>
                        <tr>
                            <th v-text="i18n('perfTest.report.NinetyMeanTime')"></th>
                            <td>
                                <span>{{ test.ninetyMeanTime | numFormat('0,0.00') }}</span>
                                <code class="ml-1">ms</code>
                            </td>
                        </tr>
                        <tr>
                            <th v-text="i18n('perfTest.report.NinetyFiveMeanTime')"></th>
                            <td>
                                <span>{{ test.ninetyFiveMeanTime | numFormat('0,0.00') }}</span>
                                <code class="ml-1">ms</code>
                            </td>
                        </tr>
                        <tr>
                            <th v-text="i18n('perfTest.report.NinetyNineMeanTime')"></th>
                            <td>
                                <span>{{ test.ninetyNineMeanTime | numFormat('0,0.00') }}</span>
                                <code class="ml-1">ms</code>
                            </td>
                        </tr>
                        <tr>
                            <th v-text="i18n('perfTest.report.maxRT')"></th>
                            <td>
                                <span>{{ test.maxRT | numFormat('0,0.00') }}</span>
                                <code class="ml-1">ms</code>
                            </td>
                        </tr>

5、报告展示

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值