Skip to content

Commit

Permalink
Divide by # of processors to reflect what Task Manager displays.
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin Sullivan committed May 9, 2016
1 parent 0378f6d commit f33ed82
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/pse/pse_windows.go
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"os"
"path/filepath"
"runtime"
"strings"
"sync"
"syscall"
Expand Down Expand Up @@ -255,7 +256,12 @@ func ProcUsage(pcpu *float64, rss, vss *int64) error {
return fmt.Errorf("could not find pid in performance counter results")
}
// assign values from the performance counters
*pcpu = cpuAry[idx]
cpu := cpuAry[idx]
if cpu > 0.0 {
cpu /= float64(runtime.NumCPU())
}

*pcpu = cpu
*rss = int64(rssAry[idx])
*vss = int64(vssAry[idx])

Expand Down

0 comments on commit f33ed82

Please sign in to comment.