|
@@ -61,8 +61,8 @@ func TestGetCPUUsage(t *testing.T) {
|
|
|
"0",
|
|
|
"0",
|
|
|
"0"})
|
|
|
- if cpustat.User != 4705 {
|
|
|
- t.Errorf("Got cpustat.User %v want %v", cpustat.User, 4705)
|
|
|
+ if cpustat.user != 4705 {
|
|
|
+ t.Errorf("Got cpustat.user %v want %v", cpustat.user, 4705)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -72,8 +72,8 @@ func TestNewCPUUsage(t *testing.T) {
|
|
|
procstatLine := "cpu 4705 356 584 3699 23 23 0 0 0 0"
|
|
|
cpustat := NewCPUStat(procstatLine)
|
|
|
|
|
|
- if cpustat.User != 4705 {
|
|
|
- t.Errorf("got %v want %v", cpustat.User, 4705)
|
|
|
+ if cpustat.user != 4705 {
|
|
|
+ t.Errorf("got %v want %v", cpustat.user, 4705)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -82,7 +82,7 @@ func TestTotalCPUTime(t *testing.T) {
|
|
|
cpustat := NewCPUStat(procstatLine)
|
|
|
|
|
|
got := cpustat.TotalTime()
|
|
|
- want := cpustat.User + cpustat.nice + cpustat.system + cpustat.idle + cpustat.iowait +
|
|
|
+ want := cpustat.user + cpustat.nice + cpustat.system + cpustat.idle + cpustat.iowait +
|
|
|
cpustat.irq + cpustat.softirq + cpustat.steal
|
|
|
|
|
|
if got != want {
|