docs: Add comment/changelog about not including guest twice

This commit is contained in:
ClementTsang 2021-12-22 14:57:15 -05:00
parent 5526fe738d
commit eaff52c8a4
2 changed files with 5 additions and 0 deletions

View file

@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#637](https://github.com/ClementTsang/bottom/pull/637): Fix process CPU calculation if /proc/stat CPU line has less values than expected - [#637](https://github.com/ClementTsang/bottom/pull/637): Fix process CPU calculation if /proc/stat CPU line has less values than expected
## Changes
- [#637](https://github.com/ClementTsang/bottom/pull/637): Remove duplicate guest time in process CPU calculation
## [0.6.5] - 2021-12-19 ## [0.6.5] - 2021-12-19
## Bug Fixes ## Bug Fixes

View file

@ -53,6 +53,7 @@ fn calculate_idle_values(line: String) -> (f64, f64) {
let steal: f64 = str_to_f64(val.next()); let steal: f64 = str_to_f64(val.next());
// Note we do not get guest/guest_nice, as they are calculated as part of user/nice respectively // Note we do not get guest/guest_nice, as they are calculated as part of user/nice respectively
// See https://github.com/htop-dev/htop/blob/main/linux/LinuxProcessList.c
let idle = idle + iowait; let idle = idle + iowait;
let non_idle = user + nice + system + irq + softirq + steal; let non_idle = user + nice + system + irq + softirq + steal;