性能测试工具 [ngrinder 二次开发填坑记] StandardDeviation 类无法找到

K米测试 · 2016年06月16日 · 最后由 Monkey 回复于 2016年06月16日 · 2260 次阅读

https://testerhome.com/topics/4225 在获取采样数据
ngrinder-core/src/main/java/net/grinder/SingleConsole.java

// tps 标准差
double tpsStd = new StandardDeviation().evaluate(tpsArray);
// tps 平均值
double tpsMean = new Mean().evaluate(tpsArray, 0, tpsArray.length);
// tps 波动率= tps 标准差 / tps 平均值
double tpsVix = 0;
if(0 != tpsMean){
    tpsVix = tpsStd / tpsMean;
}

// meanTestTime 百分位数
Percentile percentile = new Percentile();

以上的三个类无法找到,需要在 ngrinder-core 下的 pom.xlm 中添加:

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.4</version>
</dependency>
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 1 条回复 时间 点赞

直接帖子下面回复呗

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册