xtern commented on code in PR #2108: URL: https://github.com/apache/ignite-3/pull/2108#discussion_r1210356488
########## modules/runner/src/integrationTest/java/org/apache/ignite/internal/benchmark/InsertBenchmark.java: ########## @@ -136,7 +159,54 @@ void executeQuery() { } /** - * Benchmark state for {@link #jdbcInsert(JdbcState)}. Holds {@link Connection} and {@link PreparedStatement}. + * Benchmark state for {@link #sqlThinInsert(SqlThinState)}. + * + * <p>Holds {@link Session}, {@link IgniteClient}, and {@link Statement}. + */ + @State(Scope.Benchmark) + public static class SqlThinState { + private IgniteClient client; + private Statement statement; + private Session session; + + /** + * Initializes session and statement. + */ + @Setup + public void setUp() { + String fieldsQ = IntStream.range(1, 11).mapToObj(i -> "field" + i).collect(joining(",")); + String valQ = IntStream.range(1, 11).mapToObj(i -> "'" + FIELD_VAL + "'").collect(joining(",")); + + String queryStr = String.format("insert into %s(%s, %s) values(?, %s);", TABLE_NAME, "ycsb_key", fieldsQ, valQ); Review Comment: These 3 lines are duplicated in each "sql/jdbc" state, maybe it's worth separating query generation into a separate static method or string constant? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org