-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add getCpuUsageThreshold() method in SystemRuleManager #770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add getCpuUsageThreshold() method in SystemRuleManager #770
Conversation
Receive the latest request
Codecov Report
@@ Coverage Diff @@
## master #770 +/- ##
============================================
- Coverage 41% 40.92% -0.08%
+ Complexity 1334 1333 -1
============================================
Files 301 301
Lines 8629 8630 +1
Branches 1159 1159
============================================
- Hits 3538 3532 -6
- Misses 4665 4671 +6
- Partials 426 427 +1
Continue to review full report at Codecov.
|
sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/system/SystemRuleManager.java
Outdated
Show resolved
Hide resolved
And I think if you're going to retrieve the current CPU usage and load of your system, you may get them via: SystemRuleManager.getCurrentCpuUsage();
SystemRuleManager.getCurrentSystemAvgLoad() The |
sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/system/SystemRuleManager.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for contributing! |
Describe what this PR does / why we need it
Open getHighest CpuUsage to send custom alarm when system current limit occurs。
Does this pull request fix one issue?
Fixes #769
Describe how you did it
Adding getHighestCpuUsage Method
Describe how to verify it
Access via SystemRuleManager. getHighestCpuUsage
Special notes for reviews