From 99a7a0a53bbf0dcc693a2788c18f387e5f1e65f6 Mon Sep 17 00:00:00 2001 From: Angela Li Date: Thu, 18 Jul 2019 16:15:39 -0700 Subject: [PATCH] fix gofmt --- pkg/kubelet/winstats/perfcounter_nodestats.go | 2 +- pkg/kubelet/winstats/winstats_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/winstats/perfcounter_nodestats.go b/pkg/kubelet/winstats/perfcounter_nodestats.go index be4948b637f..329bd608214 100644 --- a/pkg/kubelet/winstats/perfcounter_nodestats.go +++ b/pkg/kubelet/winstats/perfcounter_nodestats.go @@ -207,7 +207,7 @@ func (p *perfCounterNodeStatsClient) convertCPUValue(cpuCores int, cpuValue uint } func (p *perfCounterNodeStatsClient) getCPUUsageNanoCores() uint64 { - cpuUsageNanoCores := (p.cpuUsageCoreNanoSecondsCache.latestValue - p.cpuUsageCoreNanoSecondsCache.previousValue) * uint64(time.Second / time.Nanosecond) / uint64(defaultCachePeriod) + cpuUsageNanoCores := (p.cpuUsageCoreNanoSecondsCache.latestValue - p.cpuUsageCoreNanoSecondsCache.previousValue) * uint64(time.Second/time.Nanosecond) / uint64(defaultCachePeriod) return cpuUsageNanoCores } diff --git a/pkg/kubelet/winstats/winstats_test.go b/pkg/kubelet/winstats/winstats_test.go index 9f4e41573ea..c74598ba3b7 100644 --- a/pkg/kubelet/winstats/winstats_test.go +++ b/pkg/kubelet/winstats/winstats_test.go @@ -151,7 +151,7 @@ func TestConvertCPUValue(t *testing.T) { func TestGetCPUUsageNanoCores(t *testing.T) { p := perfCounterNodeStatsClient{} p.cpuUsageCoreNanoSecondsCache = cpuUsageCoreNanoSecondsCache{ - latestValue: uint64(5000000000), + latestValue: uint64(5000000000), previousValue: uint64(2000000000), } cpuUsageNanoCores := p.getCPUUsageNanoCores()