troubleshoot anomalous int max with stacktrace

This commit is contained in:
Azareal 2020-02-28 09:21:38 +10:00
parent af7b6ebbcb
commit 8db923cb6e
1 changed files with 4 additions and 1 deletions

View File

@ -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()