Fix a couple imports and a float comparison test
This commit is contained in:
parent
ba96ae78dd
commit
941c9acabf
|
@ -82,7 +82,7 @@ func testCPUPercent(t *testing.T, percpu bool) {
|
||||||
t.Errorf("error %v", err)
|
t.Errorf("error %v", err)
|
||||||
}
|
}
|
||||||
for _, percent := range v {
|
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)
|
t.Fatalf("CPUPercent value is invalid: %f", percent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/influxdb/tivan/plugins/system/ps/common"
|
||||||
cpu "github.com/shirou/gopsutil/cpu"
|
"github.com/influxdb/tivan/plugins/system/ps/cpu"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetDockerIDList returnes a list of DockerID.
|
// GetDockerIDList returnes a list of DockerID.
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"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
|
// NetIOCounters returnes network I/O statistics for every network
|
||||||
|
|
Loading…
Reference in New Issue