瀏覽代碼

Fix the logic of getting maxSuccessQps in StatisticNode (#1196)

master
fangwentong Eric Zhao 5 年之前
父節點
當前提交
0e110c68ea
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      sentinel-core/src/main/java/com/alibaba/csp/sentinel/node/StatisticNode.java

+ 2
- 1
sentinel-core/src/main/java/com/alibaba/csp/sentinel/node/StatisticNode.java 查看文件

@@ -213,7 +213,8 @@ public class StatisticNode implements Node {

@Override
public double maxSuccessQps() {
return rollingCounterInSecond.maxSuccess() * rollingCounterInSecond.getSampleCount();
return (double) rollingCounterInSecond.maxSuccess() * rollingCounterInSecond.getSampleCount()
/ rollingCounterInSecond.getWindowIntervalInSec();
}

@Override


Loading…
取消
儲存