func (t *Tracker) Max1m() int64 {
	t.mu.Lock()
	defer t.mu.Unlock()
	t.advance()
	return t.maxTS[minute].max()
}
Max1m returns the maximum value for the last 1 minute.
package stats
import (
	"math"
	"sync"
	"time"
)
type Tracker struct {
	mu           sync.RWMutex
	min, max     int64  
	minTS, maxTS [3]*timeseries
	lastUpdate   time.Time
}
func newTracker() *Tracker {
	now := TimeNow()
	t := &Tracker{}
	t.minTS[hour] = newTimeSeries(now, time.Hour, time.Minute)
	t.minTS[tenminutes] = newTimeSeries(now, 10*time.Minute, 10*time.Second)
	t.minTS[minute] = newTimeSeries(now, time.Minute, time.Second)
	t.maxTS[hour] = newTimeSeries(now, time.Hour, time.Minute)
	t.maxTS[tenminutes] = newTimeSeries(now, 10*time.Minute, 10*time.Second)
	t.maxTS[minute] = newTimeSeries(now, time.Minute, time.Second)
	t.init()
	return t
}
func (t *Tracker) init() {
	t.min = math.MaxInt64
	t.max = math.MinInt64
	for _, ts := range t.minTS {
		ts.set(math.MaxInt64)
	}
	for _, ts := range t.maxTS {
		ts.set(math.MinInt64)
	}
}
func (t *Tracker) advance() time.Time {
	now := TimeNow()
	for _, ts := range t.minTS {
		ts.advanceTimeWithFill(now, math.MaxInt64)
	}
	for _, ts := range t.maxTS {
		ts.advanceTimeWithFill(now, math.MinInt64)
	}
	return now
}
func (t *Tracker) LastUpdate() time.Time {
	t.mu.RLock()
	defer t.mu.RUnlock()
	return t.lastUpdate
}
func (t *Tracker) Push(value int64) {
	t.mu.Lock()
	defer t.mu.Unlock()
	t.lastUpdate = t.advance()
	if t.min > value {
		t.min = value
	}
	if t.max < value {
		t.max = value
	}
	for _, ts := range t.minTS {
		if ts.headValue() > value {
			ts.set(value)
		}
	}
	for _, ts := range t.maxTS {
		if ts.headValue() < value {
			ts.set(value)
		}
	}
}
func (t *Tracker) Min() int64 {
	t.mu.RLock()
	defer t.mu.RUnlock()
	return t.min
}
func (t *Tracker) Max() int64 {
	t.mu.RLock()
	defer t.mu.RUnlock()
	return t.max
}
func (t *Tracker) Min1h() int64 {
	t.mu.Lock()
	defer t.mu.Unlock()
	t.advance()
	return t.minTS[hour].min()
}
func (t *Tracker) Max1h() int64 {
	t.mu.Lock()
	defer t.mu.Unlock()
	t.advance()
	return t.maxTS[hour].max()
}
func (t *Tracker) Min10m() int64 {
	t.mu.Lock()
	defer t.mu.Unlock()
	t.advance()
	return t.minTS[tenminutes].min()
}
func (t *Tracker) Max10m() int64 {
	t.mu.Lock()
	defer t.mu.Unlock()
	t.advance()
	return t.maxTS[tenminutes].max()
}
func (t *Tracker) Min1m() int64 {
	t.mu.Lock()
	defer t.mu.Unlock()
	t.advance()
	return t.minTS[minute].min()
}