You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2019/08/21 22:41:34 UTC

[GitHub] [geode-benchmarks] agingade commented on a change in pull request #99: Added benchmarks for aggregate functions.

agingade commented on a change in pull request #99: Added benchmarks for aggregate functions.
URL: https://github.com/apache/geode-benchmarks/pull/99#discussion_r316426543
 
 

 ##########
 File path: geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/AbstractReplicatedIndexedQueryBenchmark.java
 ##########
 @@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package org.apache.geode.benchmark.tests;
+
+import static org.apache.geode.benchmark.topology.ClientServerTopology.Roles.CLIENT;
+import static org.apache.geode.benchmark.topology.ClientServerTopology.Roles.SERVER;
+
+import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
+import org.apache.geode.benchmark.tasks.CreateIndexOnID;
+import org.apache.geode.benchmark.tasks.CreateReplicatedRegion;
+import org.apache.geode.benchmark.tasks.PrePopulateRegion;
+import org.apache.geode.benchmark.topology.ClientServerTopology;
+import org.apache.geode.perftest.PerformanceTest;
+import org.apache.geode.perftest.TestConfig;
+
+abstract class AbstractReplicatedIndexedQueryBenchmark implements PerformanceTest {
+  private long keyRange = 500000;
+  private long queryRange = 1000;
+
+  public final void setKeyRange(long keyRange) {
+    this.keyRange = keyRange;
+  }
+
+  public final long getKeyRange() {
+    return keyRange;
+  }
+
+  public long getQueryRange() {
+    return queryRange;
+  }
+
+  public void setQueryRange(long queryRange) {
+    this.queryRange = queryRange;
+  }
+
+  @Override
+  public TestConfig configure() {
+    TestConfig config = GeodeBenchmark.createConfig();
+    config.threads(Runtime.getRuntime().availableProcessors() * 4);
+    ClientServerTopology.configure(config);
+    config.before(new CreateReplicatedRegion(), SERVER);
+    config.before(new CreateClientProxyRegion(), CLIENT);
+    config.before(new CreateIndexOnID(), SERVER);
 
 Review comment:
   We could populate the region first and then create index; that is faster to get the region setup.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services