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

Function getCounterValue

modules/distributor/queue/queue_test.go:44–51  ·  view source on GitHub ↗
(metric *prometheus.CounterVec)

Source from the content-addressed store, hash-verified

42}
43
44func getCounterValue(metric *prometheus.CounterVec) float64 {
45 m := &dto.Metric{}
46 if err := metric.WithLabelValues("testName", "testTenantID").Write(m); err != nil {
47 return 0
48 }
49
50 return m.Counter.GetValue()
51}
52
53func TestNew_ReturnsNotNilAndSetsCorrectFieldsFromConfig(t *testing.T) {
54 // Given

Calls 2

WriteMethod · 0.65
GetValueMethod · 0.45

Tested by

no test coverage detected