timestats

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Quantile

type Quantile struct {
	N   int64
	Max int64
	Rel string
}

type Tracker

type Tracker struct {
	// contains filtered or unexported fields
}

Tracker tracks statistics for an event source in a concurrent safe manner. Tracking is done at the millisecond resolution.

This is useful only for low numbers of events.

func NewTracker

func NewTracker(n int) *Tracker

func (*Tracker) Add

func (t *Tracker) Add(d time.Duration)

func (*Tracker) Quantiles

func (t *Tracker) Quantiles() []Quantile

Jump to

Keyboard shortcuts

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