Add e2e test monitoring current container resource usage with updated

constants.

This reverts commit 1f7ea4f08e.
This commit is contained in:
gmarek
2015-08-10 09:41:58 +02:00
parent 3f18641857
commit bc8565d55e
3 changed files with 137 additions and 1 deletions

View File

@@ -195,6 +195,10 @@ type containerResourceUsage struct {
CPUInterval time.Duration
}
func (r *containerResourceUsage) isStrictlyGreaterThan(rhs *containerResourceUsage) bool {
return r.CPUUsageInCores > rhs.CPUUsageInCores && r.MemoryUsageInBytes > rhs.MemoryUsageInBytes && r.MemoryWorkingSetInBytes > rhs.MemoryWorkingSetInBytes
}
// getOneTimeResourceUsageOnNode queries the node's /stats/container endpoint
// and returns the resource usage of targetContainers for the past
// cpuInterval.