HistogramValue returns the value of a histogram metric with the given name and labels.
(t testing.TB, reg prometheus.Gatherer, metricName string, labels prometheus.Labels)
| 39 | |
| 40 | // HistogramValue returns the value of a histogram metric with the given name and labels. |
| 41 | func HistogramValue(t testing.TB, reg prometheus.Gatherer, metricName string, labels prometheus.Labels) *io_prometheus_client.Histogram { |
| 42 | t.Helper() |
| 43 | |
| 44 | labeled := MetricValue(t, reg, metricName, labels) |
| 45 | require.NotNilf(t, labeled, "metric %q with labels %v not found", metricName, labels) |
| 46 | return labeled.GetHistogram() |
| 47 | } |
| 48 | |
| 49 | // GaugeValue returns the value of a gauge metric with the given name and labels. |
| 50 | func GaugeValue(t testing.TB, reg prometheus.Gatherer, metricName string, labels prometheus.Labels) int { |