change comments

This commit is contained in:
Nan Deng 2014-06-12 11:25:38 -07:00
parent cc8a8bc615
commit 5373161db3

View File

@ -100,22 +100,22 @@ func (self *ContainerInfo) StatsEndTime() time.Time {
return ret return ret
} }
// All CPU usage metrics are cumulative from the creation of the container
type CpuStats struct { type CpuStats struct {
Usage struct { Usage struct {
// Number of nanoseconds of CPU time used by the container // Total CPU usage.
// since the beginning. This is a ccumulative // Units: nanoseconds
// value, not an instantaneous value.
Total uint64 `json:"total"` Total uint64 `json:"total"`
// Per CPU/core usage of the container. // Per CPU/core usage of the container.
// Unit: nanoseconds. // Unit: nanoseconds.
PerCpu []uint64 `json:"per_cpu,omitempty"` PerCpu []uint64 `json:"per_cpu,omitempty"`
// How much time was spent in user space since beginning. // Time spent in user space.
// Unit: nanoseconds // Unit: nanoseconds
User uint64 `json:"user"` User uint64 `json:"user"`
// How much time was spent in kernel space since beginning. // Time spent in kernel space.
// Unit: nanoseconds // Unit: nanoseconds
System uint64 `json:"system"` System uint64 `json:"system"`
} `json:"usage"` } `json:"usage"`
@ -162,7 +162,6 @@ type ContainerStatsSample struct {
Duration time.Duration `json:"duration"` Duration time.Duration `json:"duration"`
Cpu struct { Cpu struct {
// number of nanoseconds of CPU time used by the container // number of nanoseconds of CPU time used by the container
// within one second.
Usage uint64 `json:"usage"` Usage uint64 `json:"usage"`
} `json:"cpu"` } `json:"cpu"`
Memory struct { Memory struct {