Skip to content

Instantly share code, notes, and snippets.

@alicek106
Created March 10, 2018 07:06
Show Gist options
  • Save alicek106/76917a1056e48d9424d265db07a59da8 to your computer and use it in GitHub Desktop.
Save alicek106/76917a1056e48d9424d265db07a59da8 to your computer and use it in GitHub Desktop.
type MemoryStats struct {
// Current memory usage, this includes all memory regardless of when it was
// accessed.
// Units: Bytes.
Usage uint64 `json:"usage"`
// Maximum memory usage recorded.
// Units: Bytes.
MaxUsage uint64 `json:"max_usage"`
// Number of bytes of page cache memory.
// Units: Bytes.
Cache uint64 `json:"cache"`
// The amount of anonymous and swap cache memory (includes transparent
// hugepages).
// Units: Bytes.
RSS uint64 `json:"rss"`
// The amount of swap currently used by the processes in this cgroup
// Units: Bytes.
Swap uint64 `json:"swap"`
// The amount of working set memory, this includes recently accessed memory,
// dirty memory, and kernel memory. Working set is <= "usage".
// Units: Bytes.
WorkingSet uint64 `json:"working_set"`
Failcnt uint64 `json:"failcnt"`
ContainerData MemoryStatsMemoryData `json:"container_data,omitempty"`
HierarchicalData MemoryStatsMemoryData `json:"hierarchical_data,omitempty"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment