korlov42 commented on code in PR #2108:
URL: https://github.com/apache/ignite-3/pull/2108#discussion_r1211424944
##########
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:
make sense. I've extracted this to the static method. Please take a look one
more time
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]