metrics

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 45

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	Labels []metrics.Label
}

Metrics defines the metrics wrapper for the store package

func NewMetrics

func NewMetrics(labels [][]string) Metrics

NewMetrics returns a new instance of the Metrics with labels set by the node operator

func (Metrics) MeasureSince

func (m Metrics) MeasureSince(keys ...string)

MeasureSince provides a wrapper functionality for emitting a time measure metric with global labels (if any).

type NoOpMetrics

type NoOpMetrics struct{}

NoOpMetrics is a no-op implementation of the StoreMetrics interface

func NewNoOpMetrics

func NewNoOpMetrics() NoOpMetrics

NewNoOpMetrics returns a new instance of the NoOpMetrics

func (NoOpMetrics) MeasureSince

func (m NoOpMetrics) MeasureSince(keys ...string)

MeasureSince is a no-op implementation of the StoreMetrics interface to avoid time.Now() calls

type StoreMetrics

type StoreMetrics interface {
	MeasureSince(keys ...string)
}

StoreMetrics defines the set of metrics for the store package

Jump to

Keyboard shortcuts

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