浏览代码

Add getCpuUsageThreshold() method in SystemRuleManager (#770)

master
yikangfeng Eric Zhao 5 年前
父节点
当前提交
4ec0462e31
共有 1 个文件被更改,包括 5 次插入1 次删除
  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 查看文件

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

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

正在加载...
取消
保存