Merge pull request #319 from vmarmol/omitempty-stats
Memory stats should not be omited if empty.
This commit is contained in:
commit
5884edd71b
@ -197,29 +197,23 @@ type DiskIoStats struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type MemoryStats struct {
|
type MemoryStats struct {
|
||||||
// Memory limit, equivalent to "limit" in MemorySpec.
|
|
||||||
// Units: Bytes.
|
|
||||||
Limit uint64 `json:"limit,omitempty"`
|
|
||||||
|
|
||||||
// Usage statistics.
|
|
||||||
|
|
||||||
// Current memory usage, this includes all memory regardless of when it was
|
// Current memory usage, this includes all memory regardless of when it was
|
||||||
// accessed.
|
// accessed.
|
||||||
// Units: Bytes.
|
// Units: Bytes.
|
||||||
Usage uint64 `json:"usage,omitempty"`
|
Usage uint64 `json:"usage"`
|
||||||
|
|
||||||
// The amount of working set memory, this includes recently accessed memory,
|
// The amount of working set memory, this includes recently accessed memory,
|
||||||
// dirty memory, and kernel memory. Working set is <= "usage".
|
// dirty memory, and kernel memory. Working set is <= "usage".
|
||||||
// Units: Bytes.
|
// Units: Bytes.
|
||||||
WorkingSet uint64 `json:"working_set,omitempty"`
|
WorkingSet uint64 `json:"working_set"`
|
||||||
|
|
||||||
ContainerData MemoryStatsMemoryData `json:"container_data,omitempty"`
|
ContainerData MemoryStatsMemoryData `json:"container_data,omitempty"`
|
||||||
HierarchicalData MemoryStatsMemoryData `json:"hierarchical_data,omitempty"`
|
HierarchicalData MemoryStatsMemoryData `json:"hierarchical_data,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type MemoryStatsMemoryData struct {
|
type MemoryStatsMemoryData struct {
|
||||||
Pgfault uint64 `json:"pgfault,omitempty"`
|
Pgfault uint64 `json:"pgfault"`
|
||||||
Pgmajfault uint64 `json:"pgmajfault,omitempty"`
|
Pgmajfault uint64 `json:"pgmajfault"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type NetworkStats struct {
|
type NetworkStats struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user