testutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CounterValue

func CounterValue(tb testing.TB, vec *prometheus.CounterVec, labels ...string) float64

CounterValue returns the current value for a CounterVec label set.

func GaugeValue

func GaugeValue(tb testing.TB, g prometheus.Gauge) float64

GaugeValue returns the current value of a Gauge.

func HistogramSampleCount

func HistogramSampleCount(tb testing.TB, vec *prometheus.HistogramVec, labels ...string) uint64

HistogramSampleCount returns the number of observations recorded on a HistogramVec for the given label set. Asserting the count (rather than a specific duration) is what makes a wall-clock metric testable without a stubbed clock.

Types

This section is empty.

Jump to

Keyboard shortcuts

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