MCPcopy Create free account
hub / github.com/coder/coder / PromGaugeAssertion

Function PromGaugeAssertion

testutil/prometheus.go:27–30  ·  view source on GitHub ↗
(t testing.TB, metrics []*dto.MetricFamily, assert func(in float64) bool, name string, labels ...string)

Source from the content-addressed store, hash-verified

25}
26
27func PromGaugeAssertion(t testing.TB, metrics []*dto.MetricFamily, assert func(in float64) bool, name string, labels ...string) bool {
28 t.Helper()
29 return assert(getValue(t, metrics, gaugeKind, name, labels...))
30}
31
32func PromCounterAssertion(t testing.TB, metrics []*dto.MetricFamily, assert func(in float64) bool, name string, labels ...string) bool {
33 t.Helper()

Callers 1

TestPGPubsub_MetricsFunction · 0.92

Calls 2

getValueFunction · 0.85
HelperMethod · 0.65

Tested by 1

TestPGPubsub_MetricsFunction · 0.74