From 62f99cc62929bebf6c2518350ebd3246dcd03017 Mon Sep 17 00:00:00 2001 From: Charlie Voiselle Date: Wed, 9 May 2018 13:21:35 -0400 Subject: [PATCH] Addressed review comments --- helper/stats/cpu.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helper/stats/cpu.go b/helper/stats/cpu.go index 5f2623047..c19bff84e 100644 --- a/helper/stats/cpu.go +++ b/helper/stats/cpu.go @@ -12,7 +12,9 @@ import ( ) const ( - // We use this constant to override the built in 3 second timeout in gopsutil + // cpuInfoTimeout is the timeout used when gathering CPU info. This is used + // to override the default timeout in gopsutil which has a tendency to + // timeout on Windows. cpuInfoTimeout = 10 * time.Second ) @@ -36,7 +38,6 @@ func Init() error { var cpuInfo []cpu.InfoStat ctx, _ := context.WithTimeout(context.Background(), cpuInfoTimeout) - if cpuInfo, err = cpu.InfoWithContext(ctx); err != nil { merrs = multierror.Append(merrs, fmt.Errorf("Unable to obtain CPU information: %v", initErr)) }