-
Notifications
You must be signed in to change notification settings - Fork 25
feat: add ability to get individual controller stats #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f8a0dd5 to
7c07d8a
Compare
|
Hi @kolyshkin |
|
Hi @haircommander |
fs/fs.go
Outdated
| return stats, nil | ||
| } | ||
|
|
||
| func (m *Manager) GetCpuStats() (*cgroups.Stats, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe call these Add*Stats and have them take a stats object, so we can iteratively populate rather than needing to merge later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
I have refactored all to Add*Stats.
|
would love to see some unit tests, and maybe even a POC of it being used in an end user project like CRI-O |
I have added the unit tests
I'm not very familiar with codebase of CRI-O, but I can get a quick POC in |
This adds methods to retrieve statistics for individual cgroup controllers (CPU, memory, pids, IO, hugetlb, rdma, misc) instead of requiring all stats to be fetched at once. This enables tools like cadvisor to collect specific metrics with different housekeeping intervals, reducing computational overhead. Fixes: opencontainers#44 Signed-off-by: Sambhav Jain <jnsmbhv@gmail.com>
|
LGTM thank you! |
|
@haircommander metrics output |
This PR aims to add methods to retrieve statistics for individual cgroup controllers
(CPU, memory, pids, IO, hugetlb, rdma, misc) instead of requiring all
stats to be fetched at once.
Fixes: #44