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
Abstract template for benchmarks that want to test the performance of an Operator.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOperatorBenchmark(Session session, LocalQueryRunner localQueryRunner, String benchmarkName, int warmupIterations, int measuredIterations) protectedAbstractOperatorBenchmark(LocalQueryRunner localQueryRunner, String benchmarkName, int warmupIterations, int measuredIterations) -
Method Summary
Modifier and TypeMethodDescriptionprotected final BenchmarkAggregationFunctioncreateAggregationFunction(String name, Type... argumentTypes) createDrivers(TaskContext taskContext) protected final OperatorFactorycreateHashProjectOperator(int operatorId, PlanNodeId planNodeId, List<Type> types) protected final OperatorFactorycreateTableScanOperator(int operatorId, PlanNodeId planNodeId, String tableName, String... columnNames) execute(TaskContext taskContext) getColumnTypes(String tableName, String... columnNames) 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, runBenchmark, runBenchmark, setUp
-
Field Details
-
localQueryRunner
-
session
-
-
Constructor Details
-
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 Details
-
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
-
getColumnTypes
-
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
-
execute
-
runOnce
Description copied from class:AbstractBenchmarkRuns the benchmark and returns the result metrics- Specified by:
runOncein classAbstractBenchmark
-