Documentation ¶
Overview ¶
Package sampler provides utilities for sampling.
Index ¶
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) Percentiles ¶
func (ds *DurationSampler) Percentiles() []float64
Percentiles returns 7 metrics by order: P25, P50, P75, P95, P98, P99, P999
func (*DurationSampler) Reset ¶
func (ds *DurationSampler) Reset()
Reset reset the DurationSampler to initial state
func (*DurationSampler) Update ¶
func (ds *DurationSampler) Update(d time.Duration)
Update updates the sample. This function could be called concurrently, but should not be called concurrently with Percentiles.
type DurationSegment ¶
type DurationSegment struct {
// contains filtered or unexported fields
}
DurationSegment defines resolution for a duration segment
Click to show internal directories.
Click to hide internal directories.