Skip to content

Add functionality to get individual controller's stats #44

@sambhav-jain-16

Description

@sambhav-jain-16

Currently we have a single function for getting all stats

func (m *Manager) GetStats() (*cgroups.Stats, error) {
.

This internally calls individual controllers stats function, for example statCPU

func statCpu(dirPath string, stats *cgroups.Stats) error {

We use cadvisor for our container resource observability and it currently has a single housekeeping interval for all metrics per container. It uses this library to get the stats. However there can be cases where some metrics need to be emitted more frequently than others and getting stats from all the files and just processing some of them is just unnecessary work we can avoid.

I'm planning to add per metric housekeeping interval to cadvisor and it will be better if we can make the individual stat functions public or add methods inManager to get individual controller' stats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions