metric

package
v0.35.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 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 Counter

type Counter interface {
	Count() int32
	Inc(int32)
	Dec(int32)
	Snapshot() Counter
	Clear()
}

func NewCounter

func NewCounter() Counter

type CounterMetric

type CounterMetric interface {
	Inc()
}

CounterMetric represents a single numerical value that only ever goes up.

type DateCounter

type DateCounter interface {
	TodayCount() int64
	GetLastDaysCount(lastdays int64) []int64
	Inc(int64)
	Dec(int64)
	Snapshot() DateCounter
	Clear()
}

func NewDateCounter

func NewDateCounter(reserveDays int64) DateCounter

type GaugeMetric

type GaugeMetric interface {
	Inc()
	Dec()
	Set(float64)
}

GaugeMetric represents a single numerical value that can arbitrarily go up and down.

type HistogramMetric

type HistogramMetric interface {
	Observe(float64)
}

HistogramMetric counts individual observations.

type StandardCounter

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

func (*StandardCounter) Clear

func (c *StandardCounter) Clear()

func (*StandardCounter) Count

func (c *StandardCounter) Count() int32

func (*StandardCounter) Dec

func (c *StandardCounter) Dec(count int32)

func (*StandardCounter) Inc

func (c *StandardCounter) Inc(count int32)

func (*StandardCounter) Snapshot

func (c *StandardCounter) Snapshot() Counter

type StandardDateCounter

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

func (*StandardDateCounter) Clear

func (c *StandardDateCounter) Clear()

func (*StandardDateCounter) Dec

func (c *StandardDateCounter) Dec(count int64)

func (*StandardDateCounter) GetLastDaysCount

func (c *StandardDateCounter) GetLastDaysCount(lastdays int64) []int64

func (*StandardDateCounter) Inc

func (c *StandardDateCounter) Inc(count int64)

func (*StandardDateCounter) Snapshot

func (c *StandardDateCounter) Snapshot() DateCounter

func (*StandardDateCounter) TodayCount

func (c *StandardDateCounter) TodayCount() int64

Jump to

Keyboard shortcuts

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