MCPcopy
hub / github.com/grpc/grpc-go / newFakeMetricsRecorder

Function newFakeMetricsRecorder

experimental/stats/metricregistry_test.go:267–274  ·  view source on GitHub ↗

newFakeMetricsRecorder returns a fake metrics recorder based off the current state of global metric registry.

(t *testing.T)

Source from the content-addressed store, hash-verified

265// newFakeMetricsRecorder returns a fake metrics recorder based off the current
266// state of global metric registry.
267func newFakeMetricsRecorder(t *testing.T) *fakeMetricsRecorder {
268 fmr := &fakeMetricsRecorder{
269 t: t,
270 intValues: make(map[*MetricDescriptor]int64),
271 floatValues: make(map[*MetricDescriptor]float64),
272 }
273 return fmr
274}
275
276// verifyLabels verifies that the labels received are of the expected length.
277func verifyLabels(t *testing.T, labelsWant []string, optionalLabelsWant []string, labelsGot []string) {

Callers 3

TestMetricRegistryMethod · 0.85
TestUpDownCountsMethod · 0.85
TestNumerousIntCountsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected