stats

package
v0.0.0-...-b289748 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {
	Logger *logger.Logger
	// contains filtered or unexported fields
}

func NewStats

func NewStats(l *logger.Logger) *Stats

func (*Stats) HistogramAddSample

func (s *Stats) HistogramAddSample(vn string, val float64)

Async publish a value (add a sample) to a histogram variable.

func (*Stats) IntStatsInc

func (s *Stats) IntStatsInc(vn string, val int)

IntStatsInc() async publish an increment/decrement to int variable

func (*Stats) IntStatsSet

func (s *Stats) IntStatsSet(vn string, val int64)

Async publish int variable

func (*Stats) RegisterHistogram

func (s *Stats) RegisterHistogram(vn string, bounds []float64)

Register histogram variable. `bounds` specifies histogram buckets/bins (see comment next to the `histogram` struct definition).

func (*Stats) RegisterInt

func (s *Stats) RegisterInt(vn string)

RegisterInt() Registers integer variable. without checking for initialization.

func (*Stats) RunStat

func (s *Stats) RunStat()

func (*Stats) Shutdown

func (s *Stats) Shutdown()

Shutdown() stop publishing stats

Jump to

Keyboard shortcuts

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