aristocratos / aristocratos/bpytop

[BUG] Memory over 100GiB displays incorrectly

Open
#331 0 comments 0 reactions 1 assignee Claimed by @aristocratos View on GitHub
bug
Dominant language
Python
Stars
10.9k
Forks
422
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

When the memory goes above 100GiB the fractional part is removed so the length of the numerical string shrinks, but the previous reading is not completely flushed, so there is a leading 9 still visible.
For example
99.9 GiB -> 101 GiB shows up as 9101 GiB

**To Reproduce**

Have lots of ram and use over 100 GiB

**Expected behavior**

It should replace leading characters with spaces or display as 101.0 GiB

**Screenshots**
![image](https://user-images.githubusercontent.com/28244273/128185838-fac257d9-e399-4731-9227-5328053bd1b7.png)

**Info (please complete the following information):**
- bpytop version: 1.0.67
- psutil version: 5.8.0
- FreeBSD 13.0-RELEASE-p3
- Terminal used: zsh
- Python version, 3.8.10

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.