Worth looking at `cgroups/mem.cpp` and `cgroups/cpu.cpp` in Mesos to see how the `ResourceStatistic` object is built up from the cgroup files there.