@Test public void shouldUpdateMedianMetric() { double newMedian = INITIAL_MEDIAN + 10; when(snapshot.getMedian()).thenReturn(newMedian); timerAdapter.updateMonitorables(); assertThat(extractMonitorables(timerAdapter).get(MEDIAN).get(), Matchers.<Object>is(newMedian)); }
@Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); }
TimerAdapter implements MetricAdapter { @Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); } }
TimerAdapter implements MetricAdapter { @Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); } TimerAdapter(Timer timer, String name, String description); }
TimerAdapter implements MetricAdapter { @Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); } TimerAdapter(Timer timer, String name, String description); @Override Set<Monitorable> getMonitorables(); @Override void updateMonitorables(); }
TimerAdapter implements MetricAdapter { @Override public void updateMonitorables() { meteredAdapter.updateMonitorables(); samplingAdapter.updateMonitorables(); } TimerAdapter(Timer timer, String name, String description); @Override Set<Monitorable> getMonitorables(); @Override void updateMonitorables();  }