Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Number ¶
Number tracks a numberBucket over a bounded number of time buckets. Currently the buckets are one second long and only the last 10 seconds are kept.
type Timing ¶
type Timing struct {
Buckets map[int64]*timingBucket
Mutex *sync.RWMutex
CachedSortedDurations []time.Duration
LastCachedTime int64
}
Timing maintains time Durations for each time bucket. The Durations are kept in an array to allow for a variety of statistics to be calculated from the source data.
func (*Timing) Percentile ¶
Percentile computes the percentile given with a linear interpolation.
func (*Timing) SortedDurations ¶
SortedDurations returns an array of time.Duration sorted from shortest to longest that have occurred in the last 60 seconds.
Click to show internal directories.
Click to hide internal directories.