Skip to content
Permalink
Browse files

Fix process cpu usage being divided by cpu count

  • Loading branch information...
cjbassi committed May 15, 2018
1 parent b42d098 commit 3ab6ea23803046abbafac5fe4aa4749e750bbe27
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/widgets/proc.go
@@ -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

0 comments on commit 3ab6ea2

Please sign in to comment.
You can’t perform that action at this time.