stats

package
v0.0.0-...-5c7ffcf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpmExporter

type SpmExporter func(table string, result bool, count, cost uint64)

type SpmOnce

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

func (*SpmOnce) Done

func (so *SpmOnce) Done(result bool)

func (*SpmOnce) Reset

func (so *SpmOnce) Reset()

type SpmStatsManager

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

func NewSpmStatsManager

func NewSpmStatsManager(d time.Duration, r SpmExporter) *SpmStatsManager

func (*SpmStatsManager) Spawn

func (ssm *SpmStatsManager) Spawn(table ...string) *SpmOnce

type StatsExporter

type StatsExporter func(metrics map[string]uint64)

type StatsManager

type StatsManager struct {
	*TableStatsManager
}

func NewStatsManager

func NewStatsManager(reportDura time.Duration, r StatsExporter) *StatsManager

func (*StatsManager) Add

func (sm *StatsManager) Add(key string, value uint64)

func (*StatsManager) AddAvg

func (sm *StatsManager) AddAvg(key string, value uint64)

func (*StatsManager) AddGauge

func (sm *StatsManager) AddGauge(key string, cb func() uint64)

type TableStatsExporter

type TableStatsExporter func(metrics map[string]map[string]uint64)

func SingleExporter

func SingleExporter(f func(tableX string, metricsX map[string]uint64)) TableStatsExporter

type TableStatsManager

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

func NewTableStatsManager

func NewTableStatsManager(reportDura time.Duration, r TableStatsExporter) *TableStatsManager

func (*TableStatsManager) Add

func (tsm *TableStatsManager) Add(table string, key string, value uint64)

func (*TableStatsManager) AddAvg

func (tsm *TableStatsManager) AddAvg(table string, key string, value uint64)

Jump to

Keyboard shortcuts

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