DFSOpsCountStatistics extends StorageStatistics { @Override public boolean isTracked(String key) { return OpType.fromSymbol(key) != null; } DFSOpsCountStatistics(); void incrementOpCounter(OpType op); @Override String getScheme(); @Override Iterator<LongStatistic> getLongStatistics(); @Override Long getLong(String key); @Override boolean isTracked(String key); @Override void reset(); static final String NAME; }
@Test public void testIsTracked() { assertFalse(statistics.isTracked(null)); assertFalse(statistics.isTracked(NO_SUCH_OP)); final Iterator<LongStatistic> iter = statistics.getLongStatistics(); while (iter.hasNext()) { final LongStatistic longStatistic = iter.next(); assertTrue(statistics.isTracked(longStatistic.getName())); } }