LegacySweepMetrics { public void updateSweepTime(long sweepTime, long totalTimeElapsedSweeping) { metrics.get().timeSweeping().inc(sweepTime); metrics.get().totalTime().setValue(totalTimeElapsedSweeping); } LegacySweepMetrics(MetricRegistry metricRegistry); void updateCellsExaminedDeleted(long cellTsPairsExamined, long staleValuesDeleted); void updateSweepTime(long sweepTime, long totalTimeElapsedSweeping); void sweepError();  }
@Test public void timeElapsedMeterIsSet() { sweepMetrics.updateSweepTime( SWEEP_RESULTS.getTimeInMillis(), SWEEP_RESULTS.getTimeElapsedSinceStartedSweeping()); assertSweepTimeElapsedCurrentValueWithinMarginOfError(START_TIME); sweepMetrics.updateSweepTime( OTHER_SWEEP_RESULTS.getTimeInMillis(), OTHER_SWEEP_RESULTS.getTimeElapsedSinceStartedSweeping()); assertSweepTimeElapsedCurrentValueWithinMarginOfError(OTHER_START_TIME); }