diff options
author | Kevin Krakauer <krakauer@google.com> | 2021-02-02 12:45:25 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-02 12:47:23 -0800 |
commit | 5f7bf3152652d36903f9659688321ae7c42995d0 (patch) | |
tree | 374c56830303dc412894baa4edfd04bcda4cda74 /runsc/container/state_file.go | |
parent | f884ea13b713143ff9978092ddb352c159346167 (diff) |
Stub out basic `runsc events --stat` CPU functionality
Because we lack gVisor-internal cgroups, we take the CPU usage of the entire pod
and divide it proportionally according to sentry-internal usage stats.
This fixes `kubectl top pods`, which gets a pod's CPU usage by summing the usage
of its containers.
Addresses #172.
PiperOrigin-RevId: 355229833
Diffstat (limited to 'runsc/container/state_file.go')
-rw-r--r-- | runsc/container/state_file.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/container/state_file.go b/runsc/container/state_file.go index dfbf1f2d3..c46322ba4 100644 --- a/runsc/container/state_file.go +++ b/runsc/container/state_file.go @@ -49,7 +49,7 @@ type LoadOpts struct { // Returns ErrNotExist if no container is found. Returns error in case more than // one containers matching the ID prefix is found. func Load(rootDir string, id FullID, opts LoadOpts) (*Container, error) { - //log.Debugf("Load container, rootDir: %q, partial cid: %s", rootDir, partialID) + log.Debugf("Load container, rootDir: %q, id: %+v, opts: %+v", rootDir, id, opts) if !opts.Exact { var err error id, err = findContainerID(rootDir, id.ContainerID) |