Skip to content

fix: accumulate pwr_usage into pwr_total instead of mem_total#1539

Open
alephpiece wants to merge 5 commits intoaristocratos:mainfrom
alephpiece:fix-gpu-pwr_total
Open

fix: accumulate pwr_usage into pwr_total instead of mem_total#1539
alephpiece wants to merge 5 commits intoaristocratos:mainfrom
alephpiece:fix-gpu-pwr_total

Conversation

@alephpiece
Copy link
Copy Markdown

gpu.pwr_usage should be accumulated into pwr_total instead of mem_total.

Copy link
Copy Markdown
Owner

@aristocratos aristocratos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind also on line 1968 changing pwr_total / gpu_pwr_total_max to pwr_total * 100 / gpu_pwr_total_max since this should be a percentage value.

@alephpiece
Copy link
Copy Markdown
Author

I've updated both gpu-pwr-total and gpu-vram-total. I matched the existing style in the codebase by using double and round() to avoid integer truncation. Is this what you had in mind, or should we stick to the simpler * 100 approach?

Comment thread src/linux/btop_collect.cpp Outdated
@alephpiece alephpiece requested a review from aristocratos March 21, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants