google/cadvisor — pull request #7 by monnand (2014-06-11 20:34:36+00:00)
Title: Correct information in samples

The CPU usage in ContainerStats is cumulative usage, not instantaneous usage. The makes the samples useless because randomly sampling cumulative CPU usage is not helpful for the user.

In this PR, I made the following changes:

- Add a new strcut called ContainerStatsSample, which is used to store a sample in which the CPU usage is instantaneous
- To generate a sample, we must have two ContainerStats object so that we could calculate the diff of cumulative CPU usage.
- Make the corresponding changes in container package.
- Unit tests.