Skip to content

Commit

Permalink
Add cpu usage threshold in system guard demo.
Browse files Browse the repository at this point in the history
Signed-off-by: Carpenter Lee <[email protected]>
  • Loading branch information
CarpenterLee committed Feb 12, 2019
1 parent ea4874c commit 57631a2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ private static void initSystemRule() {
SystemRule rule = new SystemRule();
// max load is 3
rule.setHighestSystemLoad(3.0);
// max cpu usage is 60%
rule.setHighestCpuUsage(0.6);
// max avg rt of all request is 10 ms
rule.setAvgRt(10);
// max total qps is 20
Expand Down

0 comments on commit 57631a2

Please sign in to comment.