Skip to content

Commit

Permalink
delete unnecessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
daiksy committed Apr 22, 2015
1 parent 156d952 commit e2836ea
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions metrics/windows/cpuusage.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,13 @@ func (g *CPUUsageGenerator) Generate() (metrics.Values, error) {
}

results := make(map[string]float64)
sumPercentage := float64(0)
for _, v := range g.counters {
var fmtValue windows.PDH_FMT_COUNTERVALUE_DOUBLE
r, _, err := windows.PdhGetFormattedCounterValue.Call(uintptr(v.Counter), windows.PDH_FMT_DOUBLE, uintptr(0), uintptr(unsafe.Pointer(&fmtValue)))
if r != 0 && r != windows.PDH_INVALID_DATA {
return nil, err
}
results[v.PostName] = fmtValue.DoubleValue
sumPercentage += fmtValue.DoubleValue
}

cpuUsageLogger.Debugf("cpuusage: %q", results)
Expand Down

0 comments on commit e2836ea

Please sign in to comment.