FDBStoreTimer extends StoreTimer { @Override @Nonnull public Set<Aggregate> getAggregates() { return ALL_AGGREGATES; } FDBStoreTimer(); @Override @Nonnull Set<Aggregate> getAggregates(); @Override void recordTimeout(Wait event, long startTime);  }
@Test public void testAggregateMetrics() { FDBStoreTimer storeTimer = new FDBStoreTimer(); assertTrue(storeTimer.getAggregates().contains(FDBStoreTimer.CountAggregates.BYTES_DELETED)); storeTimer.increment(FDBStoreTimer.Counts.DELETE_RECORD_KEY_BYTES, 203); storeTimer.increment(FDBStoreTimer.Counts.DELETE_RECORD_VALUE_BYTES, 1000); storeTimer.increment(FDBStoreTimer.Counts.DELETE_INDEX_KEY_BYTES, 85); storeTimer.increment(FDBStoreTimer.Counts.DELETE_INDEX_VALUE_BYTES, 234); storeTimer.increment(FDBStoreTimer.Counts.REPLACE_RECORD_VALUE_BYTES, 100); assertNotNull(storeTimer.getCounter(FDBStoreTimer.CountAggregates.BYTES_DELETED)); assertEquals(1622, storeTimer.getCount(FDBStoreTimer.CountAggregates.BYTES_DELETED), "Incorrect aggregate count for BYTES_DELETED"); assertThrows(RecordCoreException.class, () -> { storeTimer.getCounter(FDBStoreTimer.CountAggregates.BYTES_DELETED).increment(44); }); }