DirectRecorderSource implements MeasurementRecorderSource { @Override public MeasurementRecorder getRecorder(final Object forWhat) { return recorders.getUnchecked(forWhat); } DirectRecorderSource(final Object forWhat, final String description,
            final String uom, final int sampleTimeMillis, final MeasurementStore store);  DirectRecorderSource(final Object forWhat, final String description,
            final String uom, final int sampleTimeMillis, final MeasurementStore store,
            final MeasurementType measurementType); @Override MeasurementRecorder getRecorder(final Object forWhat); @Override String toString();  }
@Test public void testDirectRecorder() throws IOException { MeasurementRecorderSource recorderSource = RecorderFactory.createDirectRecorderSource("test", "description"); MeasurementRecorder recorder = recorderSource.getRecorder("A"); long time = System.currentTimeMillis(); long s1 = 0; for (int i = 0; i < 100; i++) { recorder.recordAt(time + (long) i * 1000, i); s1 += i; } MeasurementRecorder recorder2 = recorderSource.getRecorder("B"); long s2 = 0; for (int i = 0; i < 100; i++) { recorder2.recordAt(time + (long) i * 1000, i); s2 += i; } org.spf4j.perf.RecorderFactoryTest.assertData("test_A", s1); org.spf4j.perf.RecorderFactoryTest.assertData("test_B", s2); }