memstats

package
v1.6.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Measurement

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

func (*Measurement) Count

func (m *Measurement) Count(n int)

Count implements stats.Measurement

func (*Measurement) Durations

func (m *Measurement) Durations() []time.Duration

func (*Measurement) Gauge

func (m *Measurement) Gauge(value interface{})

Gauge implements stats.Measurement

func (*Measurement) Increment

func (m *Measurement) Increment()

Increment implements stats.Measurement

func (*Measurement) LastDuration

func (m *Measurement) LastDuration() time.Duration

func (*Measurement) LastValue

func (m *Measurement) LastValue() float64

func (*Measurement) Observe

func (m *Measurement) Observe(value float64)

Observe implements stats.Measurement

func (*Measurement) RecordDuration added in v1.5.0

func (m *Measurement) RecordDuration() func()

RecordDuration implements stats.Measurement

func (*Measurement) SendTiming

func (m *Measurement) SendTiming(duration time.Duration)

SendTiming implements stats.Measurement

func (*Measurement) Since

func (m *Measurement) Since(start time.Time)

Since implements stats.Measurement

func (*Measurement) Values

func (m *Measurement) Values() []float64

type Opts

type Opts func(*Store)

func WithNow

func WithNow(nowFn func() time.Time) Opts

type Store

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

func New

func New(opts ...Opts) *Store

func (*Store) Get

func (ms *Store) Get(name string, tags stats.Tags) *Measurement

Get the stored measurement with the name and tags. If no measurement is found, nil is returned.

func (*Store) NewSampledTaggedStat

func (ms *Store) NewSampledTaggedStat(name, statType string, tags stats.Tags) stats.Measurement

NewSampledTaggedStat implements stats.Stats

func (*Store) NewStat

func (ms *Store) NewStat(name, statType string) (m stats.Measurement)

NewStat implements stats.Stats

func (*Store) NewTaggedStat

func (ms *Store) NewTaggedStat(name, statType string, tags stats.Tags) stats.Measurement

NewTaggedStat implements stats.Stats

func (*Store) Start

func (*Store) Start(_ context.Context)

Start implements stats.Stats

func (*Store) Stop

func (*Store) Stop()

Stop implements stats.Stats

Jump to

Keyboard shortcuts

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