sampler

package
v2.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL