Expect user + cpu to be within 500ms of total.
This should be a sane default.
This commit is contained in:
parent
5851645aa6
commit
593d546946
@ -46,7 +46,7 @@ func checkCpuStats(t *testing.T, stat info.CpuStats) {
|
||||
totalUsage += usage
|
||||
}
|
||||
inDelta(t, stat.Usage.Total, totalUsage, uint64((5 * time.Millisecond).Nanoseconds()), "Per-core CPU usage")
|
||||
inDelta(t, stat.Usage.Total, stat.Usage.User+stat.Usage.System, uint64((25 * time.Millisecond).Nanoseconds()), "User + system CPU usage")
|
||||
inDelta(t, stat.Usage.Total, stat.Usage.User+stat.Usage.System, uint64((500 * time.Millisecond).Nanoseconds()), "User + system CPU usage")
|
||||
assert.Equal(0, stat.Load, "Non-zero load is unexpected as it is currently unset. Do we need to update the test?")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user