-
Notifications
You must be signed in to change notification settings - Fork 675
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
fix(system_monitor): incorrect counter increment in CPU Usage monitor #1783
fix(system_monitor): incorrect counter increment in CPU Usage monitor #1783
Conversation
Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp>
@v-nakayama7440-esol Please allow me to change the contents above because it is difficult to understand. |
Codecov Report
@@ Coverage Diff @@
## main #1783 +/- ##
==========================================
- Coverage 10.74% 10.36% -0.39%
==========================================
Files 1148 1212 +64
Lines 84761 87628 +2867
Branches 20451 20282 -169
==========================================
- Hits 9106 9080 -26
- Misses 66301 69067 +2766
- Partials 9354 9481 +127
*This pull request uses carry forward flags. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thank you for the PR. Completed to fix the contents above. |
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
@ito-san @v-nakayama7440-esol
Same logic
|
@andoh104
|
Sorry, I withdraw my request after discussing internally in TIER IV. Please leave it there! |
…autowarefoundation#1783) Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Co-authored-by: ito-san <57388357+ito-san@users.noreply.github.com>
…autowarefoundation#1783) Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Co-authored-by: ito-san <57388357+ito-san@users.noreply.github.com>
…autowarefoundation#1783) Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Co-authored-by: ito-san <57388357+ito-san@users.noreply.github.com>
…autowarefoundation#1783) Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Co-authored-by: ito-san <57388357+ito-san@users.noreply.github.com>
…autowarefoundation#1783) Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Signed-off-by: v-nakayama7440-esol <v-nakayama7440@esol.co.jp> Co-authored-by: ito-san <57388357+ito-san@users.noreply.github.com>
Signed-off-by: v-nakayama7440-esol v-nakayama7440@esol.co.jp
Description
There is a bug that the
cpu_monitor
does not generate a warning or error unless the CPU usage becomes more than the counter threshold.The default parameters for monitoring CPU usage are as follows, and
cpu_monitor
is supposed to generate a warning after the CPU usage becomes 96% or more and it appears 2 consecutive times (monitor interval is about 1sec). As regards to error,cpu_monitor
shall generate an error after the usage becomes 100% and it appears 2 consecutive times.However, the current implementation of
cpu_monitor
generates a warning/error after the appearance of 3 times, it's counting one extra. This has been introduced from this fix #557.Changed parameters as follows to make testing easy.
And Observed an error was generated after count of 3. (This is a dump of CPU Usage)
This PR is to fix counting one extra.
Related links
#557
Tests performed
Change
usage_warn
andusage_error
incpu_monitor.param.yaml
to make testing easy.Simulate CPU high load by using
stress
command.Verify
cpu_monitor
generates an error after count of 2.b'\x02'
indicates an error.Also verify
cpu_monitor
generates an warning after count of 2.b'\x01'
indicates a warning.Notes for reviewers
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.