Fix a couple imports and a float comparison test

This commit is contained in:
Evan Phoenix 2015-04-06 16:22:34 -07:00
parent ba96ae78dd
commit 941c9acabf
3 changed files with 4 additions and 4 deletions

View File

@ -82,7 +82,7 @@ func testCPUPercent(t *testing.T, percpu bool) {
t.Errorf("error %v", err)
}
for _, percent := range v {
if percent < 0.0 || percent > 100.0*float64(numcpu) {
if percent < 0.0 || int(percent) > 100*numcpu {
t.Fatalf("CPUPercent value is invalid: %f", percent)
}
}

View File

@ -9,8 +9,8 @@ import (
"strconv"
"strings"
common "github.com/shirou/gopsutil/common"
cpu "github.com/shirou/gopsutil/cpu"
"github.com/influxdb/tivan/plugins/system/ps/common"
"github.com/influxdb/tivan/plugins/system/ps/cpu"
)
// GetDockerIDList returnes a list of DockerID.

View File

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
common "github.com/shirou/gopsutil/common"
common "github.com/influxdb/tivan/plugins/system/ps/common"
)
// NetIOCounters returnes network I/O statistics for every network