From 8db923cb6eeb14748e4ce1cd48d3fcdeff4297bf Mon Sep 17 00:00:00 2001 From: Azareal Date: Fri, 28 Feb 2020 09:21:38 +1000 Subject: [PATCH] troubleshoot anomalous int max with stacktrace --- common/counters/performance.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/counters/performance.go b/common/counters/performance.go index f0a90db8..2e5ec6cb 100644 --- a/common/counters/performance.go +++ b/common/counters/performance.go @@ -80,11 +80,14 @@ func (co *DefaultPerfCounter) insertChunk(low, high, avg int64) error { return err } -func (co *DefaultPerfCounter) Push(dur time.Duration /*_ bool*/) { +func (co *DefaultPerfCounter) Push(dur time.Duration /*,_ bool*/) { id := 0 b := co.buckets[id] //c.DebugDetail("buckets[", id, "]: ", b) micro := dur.Microseconds() + if micro == math.MaxInt32 { + c.LogWarning(errors.New("dur should not be int32 max")) + } low := b.low low.Lock()