Package io.trino.benchmark
Class AbstractOperatorBenchmark
- java.lang.Object
-
- io.trino.benchmark.AbstractBenchmark
-
- io.trino.benchmark.AbstractOperatorBenchmark
-
- Direct Known Subclasses:
AbstractSimpleOperatorBenchmark,AbstractSqlBenchmark,HashBuildAndJoinBenchmark,HashBuildBenchmark,HashJoinBenchmark
public abstract class AbstractOperatorBenchmark extends AbstractBenchmark
Abstract template for benchmarks that want to test the performance of an Operator.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocalQueryRunnerlocalQueryRunnerprotected Sessionsession
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractOperatorBenchmark(Session session, LocalQueryRunner localQueryRunner, String benchmarkName, int warmupIterations, int measuredIterations)protectedAbstractOperatorBenchmark(LocalQueryRunner localQueryRunner, String benchmarkName, int warmupIterations, int measuredIterations)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected BenchmarkAggregationFunctioncreateAggregationFunction(String name, Type... argumentTypes)protected abstract List<Driver>createDrivers(TaskContext taskContext)protected OperatorFactorycreateHashProjectOperator(int operatorId, PlanNodeId planNodeId, List<Type> types)protected OperatorFactorycreateTableScanOperator(int operatorId, PlanNodeId planNodeId, String tableName, String... columnNames)protected Map<String,Long>execute(TaskContext taskContext)protected List<Type>getColumnTypes(String tableName, String... columnNames)protected Map<String,Long>runOnce()Runs the benchmark and returns the result metricsprotected voidtearDown()Clean up any state from the benchmark.-
Methods inherited from class io.trino.benchmark.AbstractBenchmark
getBenchmarkName, getMeasuredIterations, getWarmupIterations, runBenchmark, runBenchmark, setUp
-
-
-
-
Field Detail
-
localQueryRunner
protected final LocalQueryRunner localQueryRunner
-
session
protected final Session session
-
-
Constructor Detail
-
AbstractOperatorBenchmark
protected AbstractOperatorBenchmark(LocalQueryRunner localQueryRunner, String benchmarkName, int warmupIterations, int measuredIterations)
-
AbstractOperatorBenchmark
protected AbstractOperatorBenchmark(Session session, LocalQueryRunner localQueryRunner, String benchmarkName, int warmupIterations, int measuredIterations)
-
-
Method Detail
-
tearDown
protected void tearDown()
Description copied from class:AbstractBenchmarkClean up any state from the benchmark. This is run once after all the iterations are complete.- Overrides:
tearDownin classAbstractBenchmark
-
createAggregationFunction
protected final BenchmarkAggregationFunction createAggregationFunction(String name, Type... argumentTypes)
-
createTableScanOperator
protected final OperatorFactory createTableScanOperator(int operatorId, PlanNodeId planNodeId, String tableName, String... columnNames)
-
createHashProjectOperator
protected final OperatorFactory createHashProjectOperator(int operatorId, PlanNodeId planNodeId, List<Type> types)
-
createDrivers
protected abstract List<Driver> createDrivers(TaskContext taskContext)
-
execute
protected Map<String,Long> execute(TaskContext taskContext)
-
runOnce
protected Map<String,Long> runOnce()
Description copied from class:AbstractBenchmarkRuns the benchmark and returns the result metrics- Specified by:
runOncein classAbstractBenchmark
-
-