@Test public void shouldRunTheSameTestOverDifferentParameters() { final Bag<String> countingMap = new Bag<>(); PerformanceTimerFactory.createSingleThreaded() .setIterations(ITERATIONS) .instrumentedBy(new ParametrizedPerformanceSuite<>()) .addParameter("First Object", ONE) .addParameter("Second Object", TWO) .addParameter("Third Object", THREE) .executeTest("SIMPLE", new ParametrizedRunnable<String>() { @Override public void call(final String param) { countingMap.add(param); } }).whenever(printout).use(StringTableViewer.INSTANCE); assertEquals(3, countingMap.size()); assertEquals(ITERATIONS, countingMap.getCount(ONE)); assertEquals(ITERATIONS, countingMap.getCount(TWO)); assertEquals(ITERATIONS, countingMap.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);  }