fix(scripts/cpu_info): ignore I/O wait time#363
fix(scripts/cpu_info): ignore I/O wait time#363alexandre-abrioux wants to merge 2 commits intodracula:masterfrom
Conversation
📝 WalkthroughWalkthroughLinux branch of get_percent in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Areas to check:
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)scripts/cpu_info.sh (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I'm a bit hesitant to merge this: On an x86_64-linux Arch Linux machine. I'll test on a few more machines and see. |
|
A Fedora machine: |
|
What kind of system are you testing this on? |
|
@ethancedwards8 I've tested this on multiple x86_64-linux (NixOS) machines. stress --io 16https://linux.die.net/man/1/stress Then you should have a significant difference between the two commands. |
dracula/tmuxreports my CPU usage as ~20% when my computer is mostly idle, whereas other tools, such asewwandwaybar, report it as only ~2%. This is because we are counting I/O wait time as CPU usage. I propose ignoring it and deducting it from the total percentage. After this, the results are coherent across tools.