MCPcopy
hub / github.com/grafana/tempo / assertMetricGreater

Function assertMetricGreater

integration/operations/operational_metrics_test.go:256–269  ·  view source on GitHub ↗

nolint:unparam

(t *testing.T, service *e2e.HTTPService, metric string, minValue float64, labelValues map[string]string)

Source from the content-addressed store, hash-verified

254
255// nolint:unparam
256func assertMetricGreater(t *testing.T, service *e2e.HTTPService, metric string, minValue float64, labelValues map[string]string) {
257 t.Helper()
258 opts := []e2e.MetricsOption{}
259 if len(labelValues) > 0 {
260 matchers := make([]*labels.Matcher, 0, len(labelValues))
261 for name, value := range labelValues {
262 matchers = append(matchers, &labels.Matcher{Type: labels.MatchEqual, Name: name, Value: value})
263 }
264 opts = append(opts, e2e.WithLabelMatchers(matchers...))
265 }
266 sums, err := service.SumMetrics([]string{metric}, opts...)
267 require.NoError(t, err)
268 require.Greater(t, sums[0], minValue)
269}

Callers 2

TestWriteMetricsFunction · 0.85
TestReadMetricsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected