service

package
v1.2.0-testnet-hotfix-1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Namespace = "metrics"

Variables

This section is empty.

Functions

func NewRegistry

func NewRegistry(updater Updater) metrics.Registry

Types

type Counter

type Counter struct {
	metrics.Counter
	// contains filtered or unexported fields
}

Counter

func (*Counter) Clear

func (counter *Counter) Clear()

func (*Counter) Dec

func (counter *Counter) Dec(i int64)

func (*Counter) Inc

func (counter *Counter) Inc(i int64)

type Gauge

type Gauge struct {
	metrics.Gauge
	// contains filtered or unexported fields
}

Gauge

func (*Gauge) Dec

func (gauge *Gauge) Dec(i int64)

func (*Gauge) Inc

func (gauge *Gauge) Inc(i int64)

func (*Gauge) Update

func (gauge *Gauge) Update(v int64)

type GaugeFloat64

type GaugeFloat64 struct {
	metrics.GaugeFloat64
	// contains filtered or unexported fields
}

GaugeFloat64

func (*GaugeFloat64) Update

func (gauge *GaugeFloat64) Update(v float64)

type Histogram

type Histogram struct {
	metrics.Histogram
	// contains filtered or unexported fields
}

Histogram

func (*Histogram) Clear

func (h *Histogram) Clear()

func (*Histogram) Update

func (h *Histogram) Update(v int64)

type Meter

type Meter struct {
	metrics.Meter
	// contains filtered or unexported fields
}

Meter

func (*Meter) Mark

func (meter *Meter) Mark(n int64)

func (*Meter) Stop

func (meter *Meter) Stop()

type MetricsAPI

type MetricsAPI struct{}

func (*MetricsAPI) All

func (api *MetricsAPI) All() map[string]map[string]interface{}

func (*MetricsAPI) ClearCounter

func (api *MetricsAPI) ClearCounter(name string)

Counter

func (*MetricsAPI) ClearHistogram

func (api *MetricsAPI) ClearHistogram(name string)

Histogram

func (*MetricsAPI) DecCounter

func (api *MetricsAPI) DecCounter(name string, i int64)

func (*MetricsAPI) DecGauge

func (api *MetricsAPI) DecGauge(name string, i int64)

func (*MetricsAPI) Get

func (api *MetricsAPI) Get(name string) map[string]interface{}

func (*MetricsAPI) IncCounter

func (api *MetricsAPI) IncCounter(name string, i int64)

func (*MetricsAPI) IncGauge

func (api *MetricsAPI) IncGauge(name string, i int64)

func (*MetricsAPI) List

func (api *MetricsAPI) List() []string

Query APIs

func (*MetricsAPI) MarkMeter

func (api *MetricsAPI) MarkMeter(name string, n int64)

Meter

func (*MetricsAPI) MarkPercentage

func (api *MetricsAPI) MarkPercentage(name string, marked bool)

Percentage

func (*MetricsAPI) MarkTimeWindowPercentage

func (api *MetricsAPI) MarkTimeWindowPercentage(name string, marked bool, slots int, slotIntervalNanos int64)

func (*MetricsAPI) MarkTimeWindowPercentageDefault

func (api *MetricsAPI) MarkTimeWindowPercentageDefault(name string, marked bool)

TimeWindowPercentage

func (*MetricsAPI) StopMeter

func (api *MetricsAPI) StopMeter(name string)

func (*MetricsAPI) StopTimer

func (api *MetricsAPI) StopTimer(name string)

func (*MetricsAPI) UpdateGauge

func (api *MetricsAPI) UpdateGauge(name string, v int64)

Gauge

func (*MetricsAPI) UpdateGaugeFloat64

func (api *MetricsAPI) UpdateGaugeFloat64(name string, v float64)

GaugeFloat64

func (*MetricsAPI) UpdateHistogram

func (api *MetricsAPI) UpdateHistogram(name string, v int64)

func (*MetricsAPI) UpdateTimer

func (api *MetricsAPI) UpdateTimer(name string, v int64)

Timer

type Percentage

type Percentage struct {
	infuraMetrics.Percentage
	// contains filtered or unexported fields
}

Percentage

func (*Percentage) Mark

func (p *Percentage) Mark(marked bool)

type Registry

type Registry struct {
	metrics.Registry
	// contains filtered or unexported fields
}

func (*Registry) GetOrRegisterCounter

func (r *Registry) GetOrRegisterCounter(name string, args ...interface{}) metrics.Counter

func (*Registry) GetOrRegisterGauge

func (r *Registry) GetOrRegisterGauge(name string, args ...interface{}) metrics.Gauge

func (*Registry) GetOrRegisterGaugeFloat64

func (r *Registry) GetOrRegisterGaugeFloat64(name string, args ...interface{}) metrics.GaugeFloat64

func (*Registry) GetOrRegisterHistogram

func (r *Registry) GetOrRegisterHistogram(name string, args ...interface{}) metrics.Histogram

func (*Registry) GetOrRegisterMeter

func (r *Registry) GetOrRegisterMeter(name string, args ...interface{}) metrics.Meter

func (*Registry) GetOrRegisterPercentage

func (r *Registry) GetOrRegisterPercentage(name string, args ...interface{}) infuraMetrics.Percentage

func (*Registry) GetOrRegisterTimeWindowPercentage

func (r *Registry) GetOrRegisterTimeWindowPercentage(slots int, slotInterval time.Duration, name string, args ...interface{}) infuraMetrics.Percentage

func (*Registry) GetOrRegisterTimeWindowPercentageDefault

func (r *Registry) GetOrRegisterTimeWindowPercentageDefault(name string, args ...interface{}) infuraMetrics.Percentage

func (*Registry) GetOrRegisterTimer

func (r *Registry) GetOrRegisterTimer(name string, args ...interface{}) metrics.Timer

type TimeWindowPercentage

type TimeWindowPercentage struct {
	infuraMetrics.Percentage
	// contains filtered or unexported fields
}

TimeWindowPercentage

func (*TimeWindowPercentage) Mark

func (p *TimeWindowPercentage) Mark(marked bool)

type Timer

type Timer struct {
	metrics.Timer
	// contains filtered or unexported fields
}

Timer

func (*Timer) Stop

func (timer *Timer) Stop()

func (*Timer) Time

func (timer *Timer) Time(f func())

func (*Timer) Update

func (timer *Timer) Update(d time.Duration)

func (*Timer) UpdateSince

func (timer *Timer) UpdateSince(ts time.Time)

type Updater

type Updater interface {
	ClearCounter(name string)
	DecCounter(name string, i int64)
	IncCounter(name string, i int64)

	UpdateGauge(name string, v int64)
	DecGauge(name string, i int64)
	IncGauge(name string, i int64)

	UpdateGaugeFloat64(name string, v float64)

	MarkMeter(name string, n int64)
	StopMeter(name string)

	ClearHistogram(name string)
	UpdateHistogram(name string, v int64)

	UpdateTimer(name string, v int64)
	StopTimer(name string)

	MarkPercentage(name string, marked bool)

	MarkTimeWindowPercentageDefault(name string, marked bool)
	MarkTimeWindowPercentage(name string, marked bool, slots int, slotIntervalNanos int64)
}

Jump to

Keyboard shortcuts

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