Add verify methods for BenchmarkPageProcessor
@@ -40,6 +40,7 @@ import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.VerboseMode;
+import org.testng.annotations.Test;
import java.util.Iterator;
import java.util.List;
@@ -82,6 +83,15 @@ public class BenchmarkPageProcessor
return pageBuilder.build();
}
+ @Test
+ public void verifyHandCoded()
+ {
+ BenchmarkData benchmarkData = new BenchmarkData();
+ benchmarkData.setup();
+ BenchmarkPageProcessor benchmarkPageProcessor = new BenchmarkPageProcessor();
+ benchmarkPageProcessor.handCoded(benchmarkData);
+ }
+
@Benchmark
public List<Optional<Page>> compiled(BenchmarkData data)
{
@@ -93,6 +103,15 @@ public class BenchmarkPageProcessor
data.inputPage));
}
+ @Test
+ public void verifyCompiled()
+ {
+ BenchmarkData benchmarkData = new BenchmarkData();
+ benchmarkData.setup();
+ BenchmarkPageProcessor benchmarkPageProcessor = new BenchmarkPageProcessor();
+ benchmarkPageProcessor.compiled(benchmarkData);
+ }
+
@State(Scope.Thread)
public static class BenchmarkData
{
@@ -142,7 +161,6 @@ public class BenchmarkPageProcessor
return pageBuilder.build();
}
-
private final RowExpression createFilterExpression(FunctionManager functionManager)
{
if (!filterAlwaysFails) {
