Update dependencies after protobuf update in hcsshim
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com> (cherry picked from commit d129b6f890bceb56b050bbb23ad330bb5699f78c) Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
|
||||
wstats "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats"
|
||||
"github.com/containerd/containerd/api/types"
|
||||
"github.com/containerd/containerd/protobuf"
|
||||
"github.com/containerd/typeurl/v2"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
|
||||
@@ -67,13 +68,13 @@ func (c *criService) containerMetrics(
|
||||
}
|
||||
if wstats.Processor != nil {
|
||||
cs.Cpu = &runtime.CpuUsage{
|
||||
Timestamp: wstats.Timestamp.UnixNano(),
|
||||
Timestamp: (protobuf.FromTimestamp(wstats.Timestamp)).UnixNano(),
|
||||
UsageCoreNanoSeconds: &runtime.UInt64Value{Value: wstats.Processor.TotalRuntimeNS},
|
||||
}
|
||||
}
|
||||
if wstats.Memory != nil {
|
||||
cs.Memory = &runtime.MemoryUsage{
|
||||
Timestamp: wstats.Timestamp.UnixNano(),
|
||||
Timestamp: (protobuf.FromTimestamp(wstats.Timestamp)).UnixNano(),
|
||||
WorkingSetBytes: &runtime.UInt64Value{
|
||||
Value: wstats.Memory.MemoryUsagePrivateWorkingSetBytes,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user