SemanticMetricDistribution implements Distribution { @Override public synchronized void record(double val) { distRef.get().add(val); } SemanticMetricDistribution(); @Override synchronized void record(double val); @Override java.nio.ByteBuffer getValueAndFlush(); @Override long getCount();  }
@Test public void testRecord(){ Arrays.stream(period1Data).forEach(t->distribution.record(t)); assertEquals(period1Data.length, distribution.getCount()); Arrays.stream(period2Data).forEach(t->distribution.record(t)); int expected = period1Data.length + period2Data.length; assertEquals(expected, distribution.getCount()); }