Check the CPU ContainerStats.
(t *testing.T)
| 241 | |
| 242 | // Check the CPU ContainerStats. |
| 243 | func TestDockerContainerCpuStats(t *testing.T) { |
| 244 | fm := framework.New(t) |
| 245 | defer fm.Cleanup() |
| 246 | |
| 247 | // Wait for the container to show up. |
| 248 | containerID := fm.Docker().RunBusybox("ping", "www.google.com") |
| 249 | waitForContainer(containerID, fm) |
| 250 | |
| 251 | request := &info.ContainerInfoRequest{ |
| 252 | NumStats: 1, |
| 253 | } |
| 254 | containerInfo, err := fm.Cadvisor().Client().DockerContainer(containerID, request) |
| 255 | if err != nil { |
| 256 | t.Fatal(err) |
| 257 | } |
| 258 | sanityCheck(containerID, containerInfo, t) |
| 259 | |
| 260 | // Checks for CpuStats. |
| 261 | checkCPUStats(t, containerInfo.Stats[0].Cpu) |
| 262 | } |
| 263 | |
| 264 | // Check the memory ContainerStats. |
| 265 | func TestDockerContainerMemoryStats(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…