mathoudebine / mathoudebine/turing-smart-screen-python
Automatic units in memory metrics
Open
Beginner friendly
Nobody has claimed this yet.
enhancement
- Dominant language
- Rich Text Format
- Stars
- 2.3k
- Forks
- 412
- Avg merge
- 21h 10m
- Merged PRs (30d)
- 7
Description
Automatic unit conversion for memory metrics via bytes2human in stats.py Memory class:
display_themed_value(
theme_data=memory_stats_theme_data['VIRTUAL']['USED'],
value=f"{bytes2human(sensors.Memory.virtual_used(), '%(value).1f %(symbol)s')}",
min_size=6
)
display_themed_value(
theme_data=memory_stats_theme_data['VIRTUAL']['FREE'],
value=f"{bytes2human(sensors.Memory.virtual_free(), '%(value).1f %(symbol)s')}",
min_size=6
)
display_themed_value(
theme_data=memory_stats_theme_data['VIRTUAL']['TOTAL'],
value=f"{bytes2human(sensors.Memory.virtual_free() + sensors.Memory.virtual_used(), '%(value).1f %(symbol)s')}",
min_size=6
)```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in stats.py at the Memory class and inspect how the virtual memory metrics are currently passed to display_themed_value. Check the existing bytes2human usage and apply the requested automatic conversion consistently to virtual used, free, and total values. Done means these memory metrics display human-readable units automatically.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100