### Question:
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);  }### Answer:
@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)); }
@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)); }
@Test public void shouldAssertOverDifferentParameters() { PerformanceTimerFactory.createSingleThreaded() .setIterations(1_000) .instrumentedBy(new ParametrizedPerformanceSuite<>()) .addParameter("First", 10) .addParameter("Second", 35) .addParameter("Third", 100) .addPerformanceConsumer(AssertPerformance.withTolerance(5) .assertPercentageFor("First").sameAs(10) .assertPercentageFor("Second").sameAs(35) .assertPercentageFor("Third").sameAs(100)) .executeTest("ASSERTION", new ParametrizedRunnable<Integer>() { @Override public void call(final Integer param) { sleepMicroseconds(param); } }).whenever(printout).use(StringTableViewer.INSTANCE); }