func (t *TimeSeriesSnapshot) Max() time.Duration {
	return t.histogram.Max()
}
Max returns highest event duration.
package metrics
import (
	"sync"
	"time"
)
type TimeSeries interface {
	Cumulative() time.Duration  
	HMean() time.Duration       
	Avg() time.Duration         
	P50() time.Duration         
	P75() time.Duration
	P95() time.Duration
	P99() time.Duration
	P999() time.Duration
	Long5p() time.Duration   
	Short5p() time.Duration  
	Max() time.Duration      
	Min() time.Duration      
	StdDev() time.Duration   
	Range() time.Duration    
	Time(func())
	AddTime(time.Duration)
	SetWallTime(time.Duration)
	Snapshot() TimeSeries
}
func GetOrRegisterTimeSeries(name string, r Metrics) TimeSeries {
	return r.GetOrRegister(name, NewTimeSeries).(TimeSeries)
}
func NewTimeSeries() TimeSeries {
	return &timeseries{
		histogram: NewHistogram(NewSample(&Config{Size: 50})),
	}
}
type timeseries struct {
	histogram Histogram
	mutex     sync.Mutex
}
func (t *timeseries) Cumulative() time.Duration {
	return t.histogram.Cumulative()
}
func (t *timeseries) HMean() time.Duration {
	return t.histogram.HMean()
}
func (t *timeseries) Avg() time.Duration {
	return t.histogram.Avg()
}
func (t *timeseries) P50() time.Duration {
	return t.histogram.P50()
}
func (t *timeseries) P75() time.Duration {
	return t.histogram.P75()
}
func (t *timeseries) P95() time.Duration {
	return t.histogram.P95()
}
func (t *timeseries) P99() time.Duration {
	return t.histogram.P99()
}
func (t *timeseries) P999() time.Duration {
	return t.histogram.P999()
}
func (t *timeseries) StdDev() time.Duration {
	return t.histogram.StdDev()
}
func (t *timeseries) Long5p() time.Duration {
	return t.histogram.Long5p()
}
func (t *timeseries) Short5p() time.Duration {
	return t.histogram.Short5p()
}
func (t *timeseries) Min() time.Duration {
	return t.histogram.Min()
}
func (t *timeseries) Max() time.Duration {
	return t.histogram.Max()
}
func (t *timeseries) Range() time.Duration {
	return t.histogram.Range()
}
func (t *timeseries) Time(f func()) {
	ts := time.Now()
	f()
	t.AddTime(time.Since(ts))
}
func (t *timeseries) AddTime(time time.Duration) {
	t.histogram.AddTime(time)
}
func (t *timeseries) SetWallTime(time time.Duration) {
	t.histogram.SetWallTime(time)
}
func (t *timeseries) Snapshot() TimeSeries {
	t.mutex.Lock()
	defer t.mutex.Unlock()
	return &TimeSeriesSnapshot{
		histogram: t.histogram.Snapshot().(*HistogramSnapshot),
	}
}
type TimeSeriesSnapshot struct {
	histogram *HistogramSnapshot
}
func (t *TimeSeriesSnapshot) Cumulative() time.Duration {
	return t.histogram.Cumulative()
}
func (t *TimeSeriesSnapshot) HMean() time.Duration {
	return t.histogram.HMean()
}
func (t *TimeSeriesSnapshot) Avg() time.Duration {
	return t.histogram.Avg()
}
func (t *TimeSeriesSnapshot) P50() time.Duration {
	return t.histogram.P50()
}
func (t *TimeSeriesSnapshot) P75() time.Duration {
	return t.histogram.P75()
}
func (t *TimeSeriesSnapshot) P95() time.Duration {
	return t.histogram.P95()
}
func (t *TimeSeriesSnapshot) P99() time.Duration {
	return t.histogram.P99()
}
func (t *TimeSeriesSnapshot) P999() time.Duration {
	return t.histogram.P999()
}
func (t *TimeSeriesSnapshot) StdDev() time.Duration {
	return t.histogram.StdDev()
}
func (t *TimeSeriesSnapshot) Long5p() time.Duration {
	return t.histogram.Long5p()
}
func (t *TimeSeriesSnapshot) Short5p() time.Duration {
	return t.histogram.Short5p()
}
func (t *TimeSeriesSnapshot) Min() time.Duration {
	return t.histogram.Min()
}