(metric *prometheus.CounterVec, labels ...string)
| 210 | } |
| 211 | |
| 212 | func getCounterVecValue(metric *prometheus.CounterVec, labels ...string) (float64, error) { |
| 213 | m := &dto.Metric{} |
| 214 | err := metric.WithLabelValues(labels...).Write(m) |
| 215 | if err != nil { |
| 216 | return 0, err |
| 217 | } |
| 218 | return m.Counter.GetValue(), nil |
| 219 | } |
| 220 | |
| 221 | func getHistogramCount(t *testing.T, histogram prometheus.Histogram) float64 { |
| 222 | m := &dto.Metric{} |
no test coverage detected