Skip to content

add fields definition for DockerStat API of Docker host uses cgroup2#922

Merged
fsouza merged 2 commits intofsouza:mainfrom
xruins:add-cgroupv2-fields-to-stats
Jun 2, 2022
Merged

add fields definition for DockerStat API of Docker host uses cgroup2#922
fsouza merged 2 commits intofsouza:mainfrom
xruins:add-cgroupv2-fields-to-stats

Conversation

@xruins
Copy link
Copy Markdown
Contributor

@xruins xruins commented Jun 1, 2022

This PR adds some fields to support Docker Stat API of Docker host uses cgroup2.
In addition, added test codes for Docker Stat API with cgroup2.

fix #919

xruins added 2 commits June 2, 2022 01:27
…group2

Docker Engine 20.10.0+ uses cgroup2 instead of cgroup by default when available (cf. moby/moby#40846 ).
Using cgroup2 varies the output of DockerStats API.
In particular, there are many new fields on Stats.MemoryStats.Stats.
Therefore this commit adds the fields for new fields on cgroup2 to `Stats` struct.
Copy link
Copy Markdown
Owner

@fsouza fsouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@fsouza fsouza merged commit 991fa23 into fsouza:main Jun 2, 2022
@xruins
Copy link
Copy Markdown
Contributor Author

xruins commented Jun 3, 2022

You’re welcome. Thanks you for quick review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing some fields to support Stats API on Docker host uses cgroup2

2 participants