From 8aeba61dc1cf17b680d6cd3e6bcc4c01f40ff5a3 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Tue, 14 Oct 2014 15:00:28 -0400 Subject: [PATCH] 3826: Add TODO comment on FindStat. --- services/crunchstat/crunchstat.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/crunchstat/crunchstat.go b/services/crunchstat/crunchstat.go index 9590bbbf5c..0b3920c0d8 100644 --- a/services/crunchstat/crunchstat.go +++ b/services/crunchstat/crunchstat.go @@ -67,6 +67,13 @@ func OpenAndReadAll(filename string, log_chan chan<- string) ([]byte, error) { var reportedStatFile map[string]bool var reportedNoStatFile map[string]bool +// Find the cgroup stats file in /sys/fs corresponding to the target +// cgroup. +// +// TODO: Instead of trying all options, choose a process in the +// container, and read /proc/PID/cgroup to determine the appropriate +// cgroup root for the given statgroup. (This will avoid falling back +// to host-level stats during container setup and teardown.) func FindStat(stderr chan<- string, cgroup Cgroup, statgroup string, stat string) string { if reportedStatFile == nil { reportedStatFile = make(map[string]bool) -- 2.30.2