@Test public void shouldUseTheProgression() { final Bag<String> bag = new Bag<>(); PerformanceTimerFactory.createSingleThreaded() .instrumentedBy(ProgressionPerformanceInstrumenter.builder() .setIterationProgression(FIRST_ITERATION, SECOND_ITERATION) .setSamplesPerStep(SAMPLES) .build()) .instrumentedBy(new ParametrizedPerformanceSuite<>() .addParameter("First", ONE) .addParameter("Second", TWO) .addParameter("Third", THREE)) .executeTest("PROGRESSION", new ParametrizedRunnable<String>() { @Override public void call(final String param) { bag.add(param); } }).whenever(printout).use(StringTableViewer.INSTANCE); assertEquals(3, bag.size()); final int times = (FIRST_ITERATION + SECOND_ITERATION) * SAMPLES; assertEquals(times, bag.getCount(ONE)); assertEquals(times, bag.getCount(TWO)); assertEquals(times, bag.getCount(THREE)); }
@Override public LoopPerformancesHolder executeTest( final ParametrizedRunnable<? extends T> test) { return executeTest(null, test); }
ParametrizedPerformanceSuite extends AbstractParametrizedInstrumenterSuite
            <ParametrizedPerformanceSuite<T>, T> implements PerformanceExecutorInstrumenter, ParametrizedExecutor<T> { @Override public LoopPerformancesHolder executeTest( final ParametrizedRunnable<? extends T> test) { return executeTest(null, test); } }
ParametrizedPerformanceSuite extends AbstractParametrizedInstrumenterSuite
            <ParametrizedPerformanceSuite<T>, T> implements PerformanceExecutorInstrumenter, ParametrizedExecutor<T> { @Override public LoopPerformancesHolder executeTest( final ParametrizedRunnable<? extends T> test) { return executeTest(null, test); }  }
ParametrizedPerformanceSuite extends AbstractParametrizedInstrumenterSuite
            <ParametrizedPerformanceSuite<T>, T> implements PerformanceExecutorInstrumenter, ParametrizedExecutor<T> { @Override public LoopPerformancesHolder executeTest( final ParametrizedRunnable<? extends T> test) { return executeTest(null, test); }  @Override LoopPerformancesHolder executeTest(
            final ParametrizedRunnable<? extends T> test); @Override LoopPerformancesHolder ignoreTest(
            final ParametrizedRunnable<? extends T> test); @SuppressWarnings("unchecked") @Override LoopPerformancesHolder executeTest(final String name,
            final ParametrizedRunnable<? extends T> test); @Override LoopPerformancesHolder ignoreTest(final String name,
            final ParametrizedRunnable<? extends T> test); }
ParametrizedPerformanceSuite extends AbstractParametrizedInstrumenterSuite
            <ParametrizedPerformanceSuite<T>, T> implements PerformanceExecutorInstrumenter, ParametrizedExecutor<T> { @Override public LoopPerformancesHolder executeTest( final ParametrizedRunnable<? extends T> test) { return executeTest(null, test); }  @Override LoopPerformancesHolder executeTest(
            final ParametrizedRunnable<? extends T> test); @Override LoopPerformancesHolder ignoreTest(
            final ParametrizedRunnable<? extends T> test); @SuppressWarnings("unchecked") @Override LoopPerformancesHolder executeTest(final String name,
            final ParametrizedRunnable<? extends T> test); @Override LoopPerformancesHolder ignoreTest(final String name,
            final ParametrizedRunnable<? extends T> test);  }