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

Memory Usage Display Inaccuracy Due to Lack of Decimal Points #6440

Open
muhac opened this issue Dec 19, 2024 · 0 comments
Open

Memory Usage Display Inaccuracy Due to Lack of Decimal Points #6440

muhac opened this issue Dec 19, 2024 · 0 comments
Labels
✨ enhancement A new feature implementation.

Comments

@muhac
Copy link

muhac commented Dec 19, 2024

Feature Request

Is your feature request related to a problem? Please describe.

The current implementation of memory usage display in memory_usage.rs does not retain decimal points, leading to inaccurate results.

// Skip decimals and the space before the byte unit.
display_bytes.retain(|c| match c {
' ' => {
keep = true;
false
}
'.' => {
keep = false;
false
}
_ => keep,
});
display_bytes

My server has 1.9GiB memory, but when displayed, it only shows 1GiB.

Describe the solution you'd like

The memory usage should include decimal points for better accuracy.

Describe alternatives you've considered

It would be great to make it configurable.

@muhac muhac added the ✨ enhancement A new feature implementation. label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement A new feature implementation.
Projects
None yet
Development

No branches or pull requests

1 participant