Browse Source

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

master
fangwentong Eric Zhao 5 years ago
parent
commit
0e110c68ea
1 changed files with 2 additions and 1 deletions
  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 View File

@@ -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…
Cancel
Save