Movatterモバイル変換


[0]ホーム

URL:


promhelp

package
v2.24.2Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License:AGPL-3.0Imports:12Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Overview

Package promhelp provides helper functions for asserting Prometheusmetric values in unit tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcCompare

func Compare(regprometheus.Gatherer, comparestring, metricNames ...string)error

Compare can be used to compare a registry to some prometheus formattedtext. If any values differ, an error is returned.If metric names are passed in, only those metrics will be compared.Usage: `Compare(reg, RegistryDump(reg))`

funcCounterValue

func CounterValue(ttesting.TB, regprometheus.Gatherer, metricNamestring, labelsprometheus.Labels)int

CounterValue returns the value of a counter metric with the given name and labels.

funcGaugeValue

func GaugeValue(ttesting.TB, regprometheus.Gatherer, metricNamestring, labelsprometheus.Labels)int

GaugeValue returns the value of a gauge metric with the given name and labels.

funcHistogramValue

func HistogramValue(ttesting.TB, regprometheus.Gatherer, metricNamestring, labelsprometheus.Labels) *io_prometheus_client.Histogram

HistogramValue returns the value of a histogram metric with the given name and labels.

funcRegistryDump

func RegistryDump(reg *prometheus.Registry)string

RegistryDump returns the http page for a given registry's metrics.Very useful for visual debugging.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp