feature: add process swap column for Linux - #2224
Conversation
4fbc947 to
664f193
Compare
|
Thanks for the PR! I'll take a look in the next few days. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2224 +/- ##
==========================================
- Coverage 63.63% 63.05% -0.58%
==========================================
Files 136 136
Lines 19859 19986 +127
==========================================
- Hits 12637 12602 -35
- Misses 7222 7384 +162
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ClementTsang
left a comment
There was a problem hiding this comment.
Some tentative comments, as well as noting this isn't supported for querying at the moment.
9080c94 to
e1dfb01
Compare
e1dfb01 to
b5440eb
Compare
|
@ClementTsang, Let me know what you think of the updates. |
|
yep, will take a look! |
|
Apologies for the delay, will try to get to in the next few days. |
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
|
Will take a look in a bit, thanks! |
ClementTsang
left a comment
There was a problem hiding this comment.
Found two more things while looking around and verifying things, otherwise seems fine.
There was a problem hiding this comment.
Cool, I think this looks fine. Thanks for your patience and sorry it took so long to review!
I'll merge once CI goes through.
Notes to things to follow up on after:
- Searching
- Swap%?
- Support on macOS/Windows/other platforms
- Cleaning up some of the code around process code
|
@all-contributors please add @abuhurayraniloy for code |
|
I've put up a pull request to add @abuhurayraniloy! 🎉 |
|
Thank you @ClementTsang! |
Description
Adds the initial cross-platform support for an optional
Swapcolumn in the process widget.On Linux, Bottom reads each process's swap usage from the
VmSwapfield in/proc/<PID>/status. The other platform collectors currently return no swap value, so the widget displaysN/Aon those platforms. TheSwapcolumn can be sorted like the other process columns.This also updates the nightly schema, process-widget documentation, configuration documentation, and embedded/default configuration comments.
No dependencies were added or changed.
Issue
This PR addresses the Linux-first implementation discussed in #2001. It does not fully close the issue because native per-process swap collection for the other supported platforms remains future work.
Related to: #2001
Testing
Ran:
./scripts/schema/nightly.shcargo fmt --checkcargo clippy --all -- -D warningscargo testManual testing:
<Linux distribution/version>.Swapcolumn in the process configuration.N/Awhere tested.Platforms tested:
Ubuntu 26.04 LTS
Checklist
cargo fmt)cargo clippy --all -- -D warningscargo testREADME.md, help menu, docs, configs, etc.)Other
AI assistance was used to help understand the existing Bottom codebase and draft documentation/configuration text. I personally reviewed the final changes and am responsible for the implementation and testing.