@Test
public void testTiming() {
TimingMetric<TimingMetric, TimingEvent> tm = new BasicTimingMetric<>( "foo", 0 );
long now = System.currentTimeMillis();
tm.addEvent( new BasicTimingEvent( now - 5, now ) );
tm.addEvent( new BasicTimingEvent( now - 10, now ) );
tm.addEvent( new BasicTimingEvent( now - 3, now ) );
tm.addEvent( new BasicTimingEvent( now - 4, now ) );
tm.addEvent( new BasicTimingEvent( now - 5, now ) );
tm.addEvent( new BasicTimingEvent( now - 2, now ) );
Timing mean = tm.getMean();
Timing median = tm.getCentile( new BigDecimal( 50L ) );
BigDecimal stddev = tm.getStandardDeviation().getValue();
Timing total = tm.getTotal();