Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User proper conversion for Memory values (power of 1024 instead of power of 1000) #463

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions library/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,21 +362,21 @@ def stats():

display_themed_value(
theme_data=memory_stats_theme_data['VIRTUAL']['USED'],
value=int(sensors.Memory.virtual_used() / 1000000),
value=int(sensors.Memory.virtual_used() / 1024**2),
min_size=5,
unit=" M"
)

display_themed_value(
theme_data=memory_stats_theme_data['VIRTUAL']['FREE'],
value=int(sensors.Memory.virtual_free() / 1000000),
value=int(sensors.Memory.virtual_free() / 1024**2),
min_size=5,
unit=" M"
)

display_themed_value(
theme_data=memory_stats_theme_data['VIRTUAL']['TOTAL'],
value=int((sensors.Memory.virtual_free() + sensors.Memory.virtual_used()) / 1000000),
value=int((sensors.Memory.virtual_free() + sensors.Memory.virtual_used()) / 1024**2),
min_size=5,
unit=" M"
)
Expand Down
Loading