Updating dependency github.com/google/cadvisor to version 6a8d614

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas
2020-05-14 17:29:52 -04:00
parent 449810c785
commit 082578c22f
109 changed files with 3417 additions and 1312 deletions

View File

@@ -19,7 +19,7 @@ import (
"time"
"github.com/google/cadvisor/info/v1"
"k8s.io/klog"
"k8s.io/klog/v2"
)
func machineFsStatsFromV1(fsStats []v1.FsStats) []MachineFsStats {
@@ -101,7 +101,8 @@ func ContainerStatsFromV1(containerName string, spec *v1.ContainerSpec, stats []
var last *v1.ContainerStats
for _, val := range stats {
stat := &ContainerStats{
Timestamp: val.Timestamp,
Timestamp: val.Timestamp,
ReferencedMemory: val.ReferencedMemory,
}
if spec.HasCpu {
stat.Cpu = &val.Cpu
@@ -151,6 +152,9 @@ func ContainerStatsFromV1(containerName string, spec *v1.ContainerSpec, stats []
if len(val.Accelerators) > 0 {
stat.Accelerators = val.Accelerators
}
if len(val.PerfStats) > 0 {
stat.PerfStats = val.PerfStats
}
// TODO(rjnagal): Handle load stats.
newStats = append(newStats, stat)
}
@@ -169,6 +173,7 @@ func DeprecatedStatsFromV1(cont *v1.ContainerInfo) []DeprecatedContainerStats {
HasFilesystem: cont.Spec.HasFilesystem,
HasDiskIo: cont.Spec.HasDiskIo,
HasCustomMetrics: cont.Spec.HasCustomMetrics,
ReferencedMemory: val.ReferencedMemory,
}
if stat.HasCpu {
stat.Cpu = val.Cpu