Explorar el Código

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

master
fangwentong Eric Zhao hace 5 años
padre
commit
0e110c68ea
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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 Ver fichero

@@ -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


Cargando…
Cancelar
Guardar