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

Function maxValHistogramValidator

metrics_helpers_functional_test.go:46–54  ·  view source on GitHub ↗
(name string, maxMax int)

Source from the content-addressed store, hash-verified

44}
45
46func maxValHistogramValidator(name string, maxMax int) *metricValidator {
47 return histogramValidator(name, func(t *testing.T, histogram metrics.Histogram) {
48 t.Helper()
49 max := int(histogram.Max())
50 if max > maxMax {
51 t.Errorf("Expected histogram metric '%s' max <= %d, got %d", name, maxMax, max)
52 }
53 })
54}

Callers 1

validateProducerMetricsFunction · 0.85

Calls 3

histogramValidatorFunction · 0.85
HelperMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected