From b924161086ec460ba1da9b5f61a7f50f9664dc9b Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Wed, 26 Feb 2020 12:01:02 -0800 Subject: [PATCH] Add main method to VersionedIntervalTimelineBenchmark (#9404) --- .../VersionedIntervalTimelineBenchmark.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/benchmarks/src/test/java/org/apache/druid/timeline/VersionedIntervalTimelineBenchmark.java b/benchmarks/src/test/java/org/apache/druid/timeline/VersionedIntervalTimelineBenchmark.java index 0e01d168c2b..9c2ec8b4a8c 100644 --- a/benchmarks/src/test/java/org/apache/druid/timeline/VersionedIntervalTimelineBenchmark.java +++ b/benchmarks/src/test/java/org/apache/druid/timeline/VersionedIntervalTimelineBenchmark.java @@ -41,6 +41,11 @@ import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Warmup; import org.openjdk.jmh.infra.Blackhole; +import org.openjdk.jmh.results.format.ResultFormatType; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; import java.util.ArrayList; import java.util.List; @@ -267,4 +272,17 @@ public class VersionedIntervalTimelineBenchmark 10 ); } + + public static void main(String[] args) throws RunnerException + { + Options opt = new OptionsBuilder() + .include(VersionedIntervalTimelineBenchmark.class.getSimpleName()) + .forks(1) + .syncIterations(true) + .resultFormat(ResultFormatType.CSV) + .result("versioned-interval-timeline.csv") + .build(); + + new Runner(opt).run(); + } }