Skip to content

Commit 11f74b2

Browse files
fangwentongsczyh30
authored andcommitted
Fix the logic of getting maxSuccessQps in StatisticNode (alibaba#1196)
1 parent 70146b2 commit 11f74b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sentinel-core/src/main/java/com/alibaba/csp/sentinel/node/StatisticNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ public double successQps() {
213213

214214
@Override
215215
public double maxSuccessQps() {
216-
return rollingCounterInSecond.maxSuccess() * rollingCounterInSecond.getSampleCount();
216+
return (double) rollingCounterInSecond.maxSuccess() * rollingCounterInSecond.getSampleCount()
217+
/ rollingCounterInSecond.getWindowIntervalInSec();
217218
}
218219

219220
@Override

0 commit comments

Comments
 (0)