Package org.apache.calcite.benchmarks
Class StatementTest
- java.lang.Object
-
- org.apache.calcite.benchmarks.StatementTest
-
public class StatementTest extends java.lang.Object
ComparesStatement
vsPreparedStatement
.This package contains micro-benchmarks to test calcite performance.
To run this and other benchmarks:
mvn package && java -jar ./target/ubenchmarks.jar -wi 5 -i 5 -f 1
To run with profiling:
java -Djmh.stack.lines=10 -jar ./target/ubenchmarks.jar -prof hs_comp,hs_gc,stack -f 1 -wi 5
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StatementTest.Department
Department record.static class
StatementTest.Employee
Employee record.static class
StatementTest.HrConnection
Connection to be used during tests.static class
StatementTest.HrPreparedStatement
Tests performance of reused execution of prepared statement.static class
StatementTest.HrSchema
Pojo schema containing "emps" and "depts" tables.
-
Constructor Summary
Constructors Constructor Description StatementTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
bindExecute(StatementTest.HrPreparedStatement state)
private static void
close(java.sql.ResultSet rs, java.sql.Statement st)
java.lang.String
executeQuery(StatementTest.HrConnection state)
java.lang.String
forEach(StatementTest.HrConnection state)
java.lang.String
prepareBindExecute(StatementTest.HrConnection state)
-
-
-
Method Detail
-
prepareBindExecute
public java.lang.String prepareBindExecute(StatementTest.HrConnection state) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
bindExecute
public java.lang.String bindExecute(StatementTest.HrPreparedStatement state) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
executeQuery
public java.lang.String executeQuery(StatementTest.HrConnection state) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
forEach
public java.lang.String forEach(StatementTest.HrConnection state) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
close
private static void close(java.sql.ResultSet rs, java.sql.Statement st)
-
-