Fix process cpu usage being divided by cpu count
This commit is contained in:
parent
b42d098a99
commit
3ab6ea2380
|
@ -65,8 +65,9 @@ func NewProc(keyPressed chan bool) *Proc {
|
|||
|
||||
func (self *Proc) update() {
|
||||
processes := psutil.Processes()
|
||||
for _, process := range processes {
|
||||
process.CPU /= self.cpuCount
|
||||
// have to iterate like this in order to actually change the value
|
||||
for i, _ := range processes {
|
||||
processes[i].CPU /= self.cpuCount
|
||||
}
|
||||
|
||||
self.ungroupedProcs = processes
|
||||
|
|
Loading…
Reference in New Issue
Block a user