sentinel-golang
sentinel-golang copied to clipboard
fix getProcessCpuStat return value (in percentage) breaks compatibility.
Describe what this PR does / why we need it
fix getProcessCpuStat return value (in percentage) breaks compatibility.
Does this pull request fix one issue?
Fix https://github.com/alibaba/sentinel-golang/issues/539
Describe how you did it
fix the bug that the CPU usage from getProcessCpuStat was changed to percentage value (i.e. 0-100), which breaks compatibility and affects system adaptive rules.
Describe how to verify it
Added a unit test func TestRetrieveAndUpdateCpuStatReturnValueRange(t *testing.T)
Special notes for reviews
Codecov Report
Patch coverage: 100.00
% and project coverage change: +0.08
:tada:
Comparison is base (
0807185
) 53.17% compared to head (5d210df
) 53.25%.
:exclamation: Current head 5d210df differs from pull request most recent head 0e75426. Consider uploading reports for the commit 0e75426 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #540 +/- ##
==========================================
+ Coverage 53.17% 53.25% +0.08%
==========================================
Files 91 91
Lines 5894 5896 +2
==========================================
+ Hits 3134 3140 +6
+ Misses 2413 2408 -5
- Partials 347 348 +1
Impacted Files | Coverage Δ | |
---|---|---|
core/system_metric/sys_metric_stat.go | 21.80% <100.00%> (+4.24%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Hi @binbin0325 @sczyh30, looking forward to your reply.
Hi @sczyh30 @binbin0325, if there are no doubts, we look forward to the adoption of PR
Hi @sczyh30 @binbin0325, looking forward to your reply
Hi @sczyh30 @binbin0325, looking forward to your reply