Explorar el Código

Add getCpuUsageThreshold() method in SystemRuleManager (#770)

master
yikangfeng Eric Zhao hace 5 años
padre
commit
4ec0462e31
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. +5
    -1
      sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/system/SystemRuleManager.java

+ 5
- 1
sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/system/SystemRuleManager.java Ver fichero

@@ -241,6 +241,10 @@ public class SystemRuleManager {
public static void setHighestSystemLoad(double highestSystemLoad) { public static void setHighestSystemLoad(double highestSystemLoad) {
SystemRuleManager.highestSystemLoad = highestSystemLoad; SystemRuleManager.highestSystemLoad = highestSystemLoad;
} }
public static double getCpuUsageThreshold() {
return highestCpuUsage;
}


public static void loadSystemConf(SystemRule rule) { public static void loadSystemConf(SystemRule rule) {
boolean checkStatus = false; boolean checkStatus = false;
@@ -343,4 +347,4 @@ public class SystemRuleManager {
public static double getCurrentCpuUsage() { public static double getCurrentCpuUsage() {
return statusListener.getCpuUsage(); return statusListener.getCpuUsage();
} }
}
}

Cargando…
Cancelar
Guardar