Repository navigation
fix(autoware_component_monitor): treat suffix-less RES as KiB - #12217
Conversation
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
|
This pull request has been automatically marked as stale because it has not had recent activity. |
Signed-off-by: Mikhail Edukov <mike.edukov@gmail.com>
f684c14 to
3425931
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12217 +/- ##
==========================================
+ Coverage 37.56% 37.58% +0.01%
==========================================
Files 2028 2029 +1
Lines 141955 141961 +6
==========================================
+ Hits 53331 53349 +18
+ Misses 88624 88612 -12
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… false positive Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
|
I restored the |
xmfcx
left a comment
There was a problem hiding this comment.
I checked top on Ubuntu 24.04: RES without a suffix is in KiB, the same as the rss value of ps. So the old bytes reading was wrong by a factor of 1024. The package builds, and its 29 tests pass locally. CI is green.
…refoundation/autoware_universe#12217) * fix(autoware_component_monitor): treat suffix-less RES as KiB Signed-off-by: Mikhail Edukov <mike.edukov@gmail.com> * style(autoware_component_monitor): restore NOLINT for cpplint casting false positive Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org> --------- Signed-off-by: Mikhail Edukov <mike.edukov@gmail.com> Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org> Co-authored-by: Mete Fatih Cırıt <mfc@autoware.org>
Description
Fix autoware_component_monitor memory parsing for top RES values without a unit suffix.
top may print the RES column as a plain integer which is KiB, but the previous implementation interpreted suffix-less values as bytes, under-reporting RSS by ~1024x for small processes. This PR treats suffix-less RES values as KiB and adds a unit test for the parser.
Related links
Parent Issue:
#12215
How was this PR tested?
colcon test --packages-select autoware_component_monitorNotes for reviewers
Interface changes
None.
Effects on system behavior
process_memory_bytes will increase by ~1024x in cases where top prints RES without a suffix (previously under-reported).