use of org.collectd.api.ValueList in project metrics by dropwizard.
the class CollectdReporterTest method reportsCounters.
@Test
public void reportsCounters() throws Exception {
Counter counter = mock(Counter.class);
when(counter.getCount()).thenReturn(42L);
reporter.report(map(), map("api.rest.requests.count", counter), map(), map(), map());
ValueList data = receiver.next();
assertThat(data.getValues()).containsExactly(42d);
}
use of org.collectd.api.ValueList in project metrics by dropwizard.
the class CollectdReporterTest method reportsGauges.
private <T extends Number> void reportsGauges(T value) throws Exception {
reporter.report(map("gauge", (Gauge) () -> value), map(), map(), map(), map());
ValueList data = receiver.next();
assertThat(data.getValues()).containsExactly(value.doubleValue());
}
Aggregations