MCPcopy Index your code
hub / github.com/google/cadvisor / checkMemoryStats

Function checkMemoryStats

integration/tests/api/test_utils.go:69–80  ·  view source on GitHub ↗
(t *testing.T, stat *info.MemoryStats)

Source from the content-addressed store, hash-verified

67}
68
69func checkMemoryStats(t *testing.T, stat *info.MemoryStats) {
70 assert := assert.New(t)
71
72 assert.NotEqual(0, stat.Usage, "Memory usage should not be zero")
73 assert.NotEqual(0, stat.WorkingSet, "Memory working set should not be zero")
74 assert.NotEqual(0, stat.TotalActiveFile, "Memory total active file should not be zero")
75 assert.NotEqual(0, stat.TotalInactiveFile, "Memory total inactive file should not be zero")
76 if stat.WorkingSet > stat.Usage {
77 t.Errorf("Memory working set (%d) should be at most equal to memory usage (%d)", stat.WorkingSet, stat.Usage)
78 }
79 // TODO(vmarmol): Add checks for ContainerData and HierarchicalData
80}

Calls 1

ErrorfMethod · 0.80

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…