@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); }
@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);  }