Package io.trino.benchmark
Class AbstractBenchmark
- java.lang.Object
-
- io.trino.benchmark.AbstractBenchmark
-
- Direct Known Subclasses:
AbstractOperatorBenchmark
public abstract class AbstractBenchmark extends Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBenchmark(String benchmarkName, int warmupIterations, int measuredIterations)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetBenchmarkName()protected intgetMeasuredIterations()protected intgetWarmupIterations()voidrunBenchmark()voidrunBenchmark(BenchmarkResultHook benchmarkResultHook)protected abstract Map<String,Long>runOnce()Runs the benchmark and returns the result metricsprotected voidsetUp()Initialize any state necessary to run benchmark.protected voidtearDown()Clean up any state from the benchmark.
-
-
-
Constructor Detail
-
AbstractBenchmark
protected AbstractBenchmark(String benchmarkName, int warmupIterations, int measuredIterations)
-
-
Method Detail
-
getBenchmarkName
public String getBenchmarkName()
-
getWarmupIterations
protected int getWarmupIterations()
-
getMeasuredIterations
protected int getMeasuredIterations()
-
setUp
protected void setUp()
Initialize any state necessary to run benchmark. This is run once at start up.
-
runOnce
protected abstract Map<String,Long> runOnce()
Runs the benchmark and returns the result metrics
-
tearDown
protected void tearDown()
Clean up any state from the benchmark. This is run once after all the iterations are complete.
-
runBenchmark
public void runBenchmark()
-
runBenchmark
public void runBenchmark(@Nullable BenchmarkResultHook benchmarkResultHook)
-
-