(name string, expectedCount int)
| 58 | } |
| 59 | |
| 60 | func 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 | |
| 70 | func histogramValidator(name string, extraValidator func(*testing.T, metrics.Histogram)) *metricValidator { |
| 71 | return &metricValidator{ |
no test coverage detected