You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "AMashenkov (via GitHub)" <gi...@apache.org> on 2023/05/31 10:40:13 UTC

[GitHub] [ignite-3] AMashenkov commented on a diff in pull request #2108: IGNITE-19575 Extend jmh benchmarks to compare thin clients against its embedded counterparts

AMashenkov commented on code in PR #2108:
URL: https://github.com/apache/ignite-3/pull/2108#discussion_r1211501817


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/benchmark/SelectBenchmark.java:
##########
@@ -195,4 +238,35 @@ public void tearDown() throws Exception {
             IgniteUtils.closeAll(stmt, conn);
         }
     }
+
+    /**
+     * Benchmark state for {@link #kvThinGet(KvThinState)}.
+     *
+     * <p>Holds {@link IgniteClient} and {@link KeyValueView} for the table.
+     */
+    @State(Scope.Benchmark)
+    public static class KvThinState {
+        private IgniteClient client;
+        private KeyValueView<Tuple, Tuple> kvView;
+
+        /**
+         * Creates the client.
+         */
+        @Setup
+        public void setUp() {
+            client = IgniteClient.builder().addresses("127.0.0.1:10800").build();
+            kvView = client.tables().table(TABLE_NAME).keyValueView();
+        }
+
+        @TearDown
+        public void tearDown() throws Exception {
+            IgniteUtils.closeAll(client);
+        }
+
+        KeyValueView<Tuple, Tuple> kvView() {
+            return kvView;
+        }
+    }
 }
+
+

Review Comment:
   ```suggestion
   
   ```



-- 
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-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org