MCPcopy Create free account
hub / github.com/containerd/cgroups / Stat

Method Stat

cgroup1/pids.go:65–79  ·  view source on GitHub ↗
(path string, stats *v1.Metrics)

Source from the content-addressed store, hash-verified

63}
64
65func (p *pidsController) Stat(path string, stats *v1.Metrics) error {
66 current, err := readUint(filepath.Join(p.Path(path), "pids.current"))
67 if err != nil {
68 return err
69 }
70 pidsMax, err := readUint(filepath.Join(p.Path(path), "pids.max"))
71 if err != nil {
72 return err
73 }
74 stats.Pids = &v1.PidsStat{
75 Current: current,
76 Limit: pidsMax,
77 }
78 return nil
79}

Callers

nothing calls this directly

Calls 2

PathMethod · 0.95
readUintFunction · 0.85

Tested by

no test coverage detected