Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DurationHistogram ¶
type DurationHistogram struct { N int OutOfRange int sync.RWMutex // contains filtered or unexported fields }
DurationHistogram is a histogram divided into N adjacent configurable ranges.
func NewDurationHistogram ¶
func NewDurationHistogram(steps, ends []time.Duration) (h DurationHistogram)
func (*DurationHistogram) Push ¶
func (h *DurationHistogram) Push(d time.Duration)
Push adds the duration to the histogram.
type DurationStats ¶
type DurationStats struct { Total time.Duration N uint Min time.Duration Max time.Duration // contains filtered or unexported fields }
DurationStats keeps basic time.Duration statistics. Welford's method is used to keep a running mean and standard deviation.
func (*DurationStats) IsZero ¶
func (s *DurationStats) IsZero() bool
func (*DurationStats) Mean ¶
func (s *DurationStats) Mean() time.Duration
func (*DurationStats) Push ¶
func (s *DurationStats) Push(d time.Duration)
func (*DurationStats) Stddev ¶
func (s *DurationStats) Stddev() time.Duration
func (*DurationStats) Variance ¶
func (s *DurationStats) Variance() float64
Click to show internal directories.
Click to hide internal directories.