MCPcopy
hub / github.com/IBM/sarama / countMeterValidator

Function countMeterValidator

metrics_helpers_test.go:60–68  ·  view source on GitHub ↗
(name string, expectedCount int)

Source from the content-addressed store, hash-verified

58}
59
60func countMeterValidator(name string, expectedCount int) *metricValidator {
61 return meterValidator(name, func(t *testing.T, meter metrics.Meter) {
62 t.Helper()
63 count := meter.Count()
64 if count != int64(expectedCount) {
65 t.Errorf("Expected meter metric '%s' count = %d, got %d", name, expectedCount, count)
66 }
67 })
68}
69
70func histogramValidator(name string, extraValidator func(*testing.T, metrics.Histogram)) *metricValidator {
71 return &metricValidator{

Callers 2

validateProducerMetricsFunction · 0.85
validateBrokerMetricsFunction · 0.85

Calls 3

meterValidatorFunction · 0.85
HelperMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected