diff options
author | baude <bbaude@redhat.com> | 2020-05-04 14:10:30 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2020-05-05 08:46:51 -0500 |
commit | b5a235df900a6471895111b4de5f80732f7f563a (patch) | |
tree | 7c6bb1cb564f6d69a0790fdea064a18bd0917ed1 /libpod/pod.go | |
parent | 49107a5a2ee98793b4ecfaa0e1a6cacfdf5ccdd0 (diff) | |
download | podman-b5a235df900a6471895111b4de5f80732f7f563a.tar.gz podman-b5a235df900a6471895111b4de5f80732f7f563a.tar.bz2 podman-b5a235df900a6471895111b4de5f80732f7f563a.zip |
v2 podman stats
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/pod.go')
-rw-r--r-- | libpod/pod.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libpod/pod.go b/libpod/pod.go index b5a14c165..8eb06ae2f 100644 --- a/libpod/pod.go +++ b/libpod/pod.go @@ -247,14 +247,14 @@ func (p *Pod) InfraContainerID() (string, error) { // PodContainerStats is an organization struct for pods and their containers type PodContainerStats struct { Pod *Pod - ContainerStats map[string]*ContainerStats + ContainerStats map[string]*define.ContainerStats } // GetPodStats returns the stats for each of its containers -func (p *Pod) GetPodStats(previousContainerStats map[string]*ContainerStats) (map[string]*ContainerStats, error) { +func (p *Pod) GetPodStats(previousContainerStats map[string]*define.ContainerStats) (map[string]*define.ContainerStats, error) { var ( ok bool - prevStat *ContainerStats + prevStat *define.ContainerStats ) p.lock.Lock() defer p.lock.Unlock() @@ -266,10 +266,10 @@ func (p *Pod) GetPodStats(previousContainerStats map[string]*ContainerStats) (ma if err != nil { return nil, err } - newContainerStats := make(map[string]*ContainerStats) + newContainerStats := make(map[string]*define.ContainerStats) for _, c := range containers { if prevStat, ok = previousContainerStats[c.ID()]; !ok { - prevStat = &ContainerStats{} + prevStat = &define.ContainerStats{} } newStats, err := c.GetContainerStats(prevStat) // If the container wasn't running, don't include it |