metrics

package
v2.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 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 Metrics

type Metrics struct {
	Labels []metrics.Label
}

Metrics defines a default StoreMetrics implementation.

func NewMetrics

func NewMetrics(labels [][]string) (Metrics, error)

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

func (Metrics) MeasureSince

func (m Metrics) MeasureSince(start time.Time, 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(start time.Time, keys ...string)

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

type StoreMetrics

type StoreMetrics interface {
	MeasureSince(start time.Time, keys ...string)
}

StoreMetrics defines the set of supported metric APIs for the store package.

Jump to

Keyboard shortcuts

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