use of com.couchbase.client.core.cnc.events.metrics.LatencyMetricsAggregatedEvent in project couchbase-jvm-clients by couchbase.
the class LoggingMeterIntegrationTest method aggregateMetrics.
@Test
void aggregateMetrics() {
String id = UUID.randomUUID().toString();
collection.upsert(id, JsonObject.create());
collection.get(id);
waitUntilCondition(() -> eventBus.publishedEvents().stream().anyMatch(e -> e instanceof LatencyMetricsAggregatedEvent));
List<Event> events = eventBus.publishedEvents().stream().filter(e -> e instanceof LatencyMetricsAggregatedEvent).collect(Collectors.toList());
for (Event ev : events) {
String desc = ev.description();
assertTrue(desc.contains("{\"emit_interval_s\":2}"), "Actual description: " + desc);
assertTrue(desc.contains("kv"), "Actual description: " + desc);
}
}
Aggregations