testutils

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CounterValue added in v0.15.0

func CounterValue(t *testing.T, registry *prometheus.Registry, name string, labels prometheus.Labels) float64

CounterValue gather and return value of counter metric with given name and labels.

func FindMetric added in v0.15.0

func FindMetric(
	t *testing.T,
	registry *prometheus.Registry,
	metricType io_prometheus_client.MetricType,
	name string,
	labels prometheus.Labels,
) *io_prometheus_client.Metric

FindMetric gather and returns metric of the given type, name and with the given labels from the registry.

func GaugeValue added in v0.15.0

func GaugeValue(t *testing.T, registry *prometheus.Registry, name string, labels prometheus.Labels) float64

func HistogramBucketValue added in v0.15.0

func HistogramBucketValue(t *testing.T, registry *prometheus.Registry, name string, labels prometheus.Labels, upperBound float64) uint64

func HistogramSumValue added in v0.15.0

func HistogramSumValue(t *testing.T, registry *prometheus.Registry, name string, labels prometheus.Labels) float64

HistogramSumValue gather and return sample sum of histogram metric with given name and labels.

func Must

func Must[I, R any](fn func(I) (R, error)) func(I) R

Types

This section is empty.

Jump to

Keyboard shortcuts

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