Documentation ¶
Index ¶
- type DurationSampler
- func (ds *DurationSampler) Count() float64
- func (ds *DurationSampler) P25() float64
- func (ds *DurationSampler) P50() float64
- func (ds *DurationSampler) P75() float64
- func (ds *DurationSampler) P95() float64
- func (ds *DurationSampler) P98() float64
- func (ds *DurationSampler) P99() float64
- func (ds *DurationSampler) P999() float64
- func (ds *DurationSampler) Percentiles() []float64
- func (ds *DurationSampler) Update(d time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DurationSampler ¶
type DurationSampler struct {
// contains filtered or unexported fields
}
DurationSampler is the sampler for sampling duration.
func NewDurationSampler ¶
func NewDurationSampler() *DurationSampler
NewDurationSampler creates a DurationSampler.
func (*DurationSampler) Count ¶
func (ds *DurationSampler) Count() float64
Count return total count of DurationSampler.
func (*DurationSampler) P25 ¶
func (ds *DurationSampler) P25() float64
P25 returns the duration in millisecond greater than 25%.
func (*DurationSampler) P50 ¶
func (ds *DurationSampler) P50() float64
P50 returns the duration in millisecond greater than 50%.
func (*DurationSampler) P75 ¶
func (ds *DurationSampler) P75() float64
P75 returns the duration in millisecond greater than 75%.
func (*DurationSampler) P95 ¶
func (ds *DurationSampler) P95() float64
P95 returns the duration in millisecond greater than 95%.
func (*DurationSampler) P98 ¶
func (ds *DurationSampler) P98() float64
P98 returns the duration in millisecond greater than 98%.
func (*DurationSampler) P99 ¶
func (ds *DurationSampler) P99() float64
P99 returns the duration in millisecond greater than 99%.
func (*DurationSampler) P999 ¶
func (ds *DurationSampler) P999() float64
P999 returns the duration in millisecond greater than 99.9%.
func (*DurationSampler) Percentiles ¶
func (ds *DurationSampler) Percentiles() []float64
Percentiles returns 7 metrics by order: P25, P50, P75, P95, P98, P99, P999
func (*DurationSampler) Update ¶
func (ds *DurationSampler) Update(d time.Duration)
Update updates the sample.