jesseduffield / jesseduffield/lazydocker

CPU usage is reported lower than expected

Open
#662 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
52.8k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

#### Describe the bug

CPU usage is reported under the assumption that 100% means all cores are busy. For example, ≈12% on an 8-core machine means 1 core is fully occupied.

#### To reproduce
Steps to reproduce the behavior:
1. Run `docker run --rm python:slim python -c 'while True: pass'`.
2. Run `lazydocker` and observe the CPU usage.

#### Expected behaviour
CPU usage is 100%.

#### Screenshots

lazydocker:



Docker Desktop:

#### Desktop:
- OS: macOS 15.5
- Lazydocker Version: 0.24.1

#### Additional context
There was a discussion in #104, and the decision was made at the time to keep the "1 core = 100%" display. However, this seems to have changed in d27ce19, [specifically here](https://github.com/jesseduffield/lazydocker/commit/d27ce19f6c17bd84146fb9e14c57995899479373#diff-761ad4a5715d206720aa44f51ceac7f4eb510fefe992371d512b910168ddd595L154), and was first released in [v0.18](https://github.com/jesseduffield/lazydocker/releases/tag/v0.18). Is the current behavior the expected one?

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.