You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2019/04/23 20:16:29 UTC
[geode-benchmarks] branch develop updated: Move threads
configuration. Run fewer threads on function and queries. Refactor common
elements.
This is an automated email from the ASF dual-hosted git repository.
jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git
The following commit(s) were added to refs/heads/develop by this push:
new 19442d4 Move threads configuration. Run fewer threads on function and queries. Refactor common elements.
19442d4 is described below
commit 19442d4ec5f8970e86386edb76add84f767eb502
Author: Jacob Barrett <jb...@pivotal.io>
AuthorDate: Fri Apr 19 07:03:11 2019 -0700
Move threads configuration.
Run fewer threads on function and queries.
Refactor common elements.
---
geode-benchmarks/build.gradle | 1 -
...a => AbstractPartitionedFunctionBenchmark.java} | 23 ++++++---------------
...va => AbstractReplicatedFunctionBenchmark.java} | 23 ++++++---------------
.../geode/benchmark/tests/GeodeBenchmark.java | 15 ++++++++++++--
.../PartitionedFunctionExecutionBenchmark.java | 23 +++------------------
...nedFunctionExecutionWithArgumentsBenchmark.java | 24 ++++------------------
...ionedFunctionExecutionWithFiltersBenchmark.java | 24 ++++------------------
.../ReplicatedFunctionExecutionBenchmark.java | 23 +++------------------
...tedFunctionExecutionWithArgumentsBenchmark.java | 24 ++++------------------
...catedFunctionExecutionWithFiltersBenchmark.java | 24 ++++------------------
.../org/apache/geode/perftest/WorkloadConfig.java | 2 +-
11 files changed, 48 insertions(+), 158 deletions(-)
diff --git a/geode-benchmarks/build.gradle b/geode-benchmarks/build.gradle
index 4acdbf5..6552688 100644
--- a/geode-benchmarks/build.gradle
+++ b/geode-benchmarks/build.gradle
@@ -65,7 +65,6 @@ task benchmark(type: Test) {
}
exclude "**/*IndexedQueryBenchmark.class"
- exclude "**/*Function*Benchmark.class"
forkEvery 1
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/AbstractPartitionedFunctionBenchmark.java
similarity index 73%
copy from geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionBenchmark.java
copy to geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/AbstractPartitionedFunctionBenchmark.java
index 04832e7..22800e7 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/AbstractPartitionedFunctionBenchmark.java
@@ -12,49 +12,38 @@
* 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.junit.jupiter.api.Test;
-
import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
import org.apache.geode.benchmark.tasks.CreatePartitionedRegion;
-import org.apache.geode.benchmark.tasks.ExecuteFunction;
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;
-import org.apache.geode.perftest.TestRunners;
-public class PartitionedFunctionExecutionBenchmark implements PerformanceTest {
+abstract class AbstractPartitionedFunctionBenchmark implements PerformanceTest {
private long keyRange = 1000000;
- private long functionIDRange = 1000;
-
- public PartitionedFunctionExecutionBenchmark() {}
- public void setKeyRange(long keyRange) {
+ public final void setKeyRange(long keyRange) {
this.keyRange = keyRange;
}
- public void setFunctionIDRange(long functionIDRange) {
- this.functionIDRange = functionIDRange;
- }
-
- @Test
- public void run() throws Exception {
- TestRunners.defaultRunner().runTest(this);
+ public final long getKeyRange() {
+ return keyRange;
}
@Override
public TestConfig configure() {
TestConfig config = GeodeBenchmark.createConfig();
+ config.threads(Runtime.getRuntime().availableProcessors() * 4);
ClientServerTopology.configure(config);
config.before(new CreatePartitionedRegion(), SERVER);
config.before(new CreateClientProxyRegion(), CLIENT);
config.before(new PrePopulateRegion(keyRange), SERVER);
- config.workload(new ExecuteFunction(keyRange, functionIDRange), CLIENT);
return config;
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/AbstractReplicatedFunctionBenchmark.java
similarity index 73%
copy from geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionBenchmark.java
copy to geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/AbstractReplicatedFunctionBenchmark.java
index 53f4790..4fb2676 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/AbstractReplicatedFunctionBenchmark.java
@@ -12,49 +12,38 @@
* 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.junit.jupiter.api.Test;
-
import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
import org.apache.geode.benchmark.tasks.CreateReplicatedRegion;
-import org.apache.geode.benchmark.tasks.ExecuteFunction;
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;
-import org.apache.geode.perftest.TestRunners;
-public class ReplicatedFunctionExecutionBenchmark implements PerformanceTest {
+abstract class AbstractReplicatedFunctionBenchmark implements PerformanceTest {
private long keyRange = 1000000;
- private long functionIDRange = 1000;
-
- public ReplicatedFunctionExecutionBenchmark() {}
- public void setKeyRange(long keyRange) {
+ public final void setKeyRange(long keyRange) {
this.keyRange = keyRange;
}
- public void setFunctionIDRange(long functionIDRange) {
- this.functionIDRange = functionIDRange;
- }
-
- @Test
- public void run() throws Exception {
- TestRunners.defaultRunner().runTest(this);
+ public final long getKeyRange() {
+ return keyRange;
}
@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 PrePopulateRegion(keyRange), SERVER);
- config.workload(new ExecuteFunction(keyRange, functionIDRange), CLIENT);
return config;
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/GeodeBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/GeodeBenchmark.java
index 92df316..2adbfb7 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/GeodeBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/GeodeBenchmark.java
@@ -12,8 +12,11 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+
package org.apache.geode.benchmark.tests;
+import static java.util.concurrent.TimeUnit.MINUTES;
+
import org.apache.geode.perftest.TestConfig;
public class GeodeBenchmark {
@@ -21,16 +24,24 @@ public class GeodeBenchmark {
/**
* Warm up time for the benchmark running on the default runner
*/
- public static final int WARM_UP_TIME = 60;
+ private static final long WARM_UP_TIME = MINUTES.toSeconds(1);
+
/**
* Total duration for which the benchmark will run on the default runner
*/
- public static final int BENCHMARK_DURATION = 240;
+ private static final long BENCHMARK_DURATION = MINUTES.toSeconds(5);
+
+ /**
+ * Number of threads to run benchmark.
+ */
+ private static final int THREADS = Runtime.getRuntime().availableProcessors() * 16;
+
public static TestConfig createConfig() {
TestConfig testConfig = new TestConfig();
testConfig.warmupSeconds(WARM_UP_TIME);
testConfig.durationSeconds(BENCHMARK_DURATION);
+ testConfig.threads(THREADS);
return testConfig;
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionBenchmark.java
index 04832e7..42756e5 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionBenchmark.java
@@ -15,29 +15,16 @@
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.junit.jupiter.api.Test;
-import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
-import org.apache.geode.benchmark.tasks.CreatePartitionedRegion;
import org.apache.geode.benchmark.tasks.ExecuteFunction;
-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;
import org.apache.geode.perftest.TestRunners;
-public class PartitionedFunctionExecutionBenchmark implements PerformanceTest {
- private long keyRange = 1000000;
+public class PartitionedFunctionExecutionBenchmark extends AbstractPartitionedFunctionBenchmark {
private long functionIDRange = 1000;
- public PartitionedFunctionExecutionBenchmark() {}
-
- public void setKeyRange(long keyRange) {
- this.keyRange = keyRange;
- }
-
public void setFunctionIDRange(long functionIDRange) {
this.functionIDRange = functionIDRange;
}
@@ -49,12 +36,8 @@ public class PartitionedFunctionExecutionBenchmark implements PerformanceTest {
@Override
public TestConfig configure() {
- TestConfig config = GeodeBenchmark.createConfig();
- ClientServerTopology.configure(config);
- config.before(new CreatePartitionedRegion(), SERVER);
- config.before(new CreateClientProxyRegion(), CLIENT);
- config.before(new PrePopulateRegion(keyRange), SERVER);
- config.workload(new ExecuteFunction(keyRange, functionIDRange), CLIENT);
+ TestConfig config = super.configure();
+ config.workload(new ExecuteFunction(getKeyRange(), functionIDRange), CLIENT);
return config;
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionWithArgumentsBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionWithArgumentsBenchmark.java
index 52e8965..fc7f1f5 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionWithArgumentsBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionWithArgumentsBenchmark.java
@@ -15,29 +15,17 @@
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.junit.jupiter.api.Test;
-import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
-import org.apache.geode.benchmark.tasks.CreatePartitionedRegion;
import org.apache.geode.benchmark.tasks.ExecuteParameterizedFunction;
-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;
import org.apache.geode.perftest.TestRunners;
-public class PartitionedFunctionExecutionWithArgumentsBenchmark implements PerformanceTest {
- private long keyRange = 1000000;
+public class PartitionedFunctionExecutionWithArgumentsBenchmark
+ extends AbstractPartitionedFunctionBenchmark {
private long functionIDRange = 1000;
- public PartitionedFunctionExecutionWithArgumentsBenchmark() {}
-
- public void setKeyRange(long keyRange) {
- this.keyRange = keyRange;
- }
-
public void setFunctionIDRange(long functionIDRange) {
this.functionIDRange = functionIDRange;
}
@@ -50,12 +38,8 @@ public class PartitionedFunctionExecutionWithArgumentsBenchmark implements Perfo
@Override
public TestConfig configure() {
- TestConfig config = GeodeBenchmark.createConfig();
- ClientServerTopology.configure(config);
- config.before(new CreatePartitionedRegion(), SERVER);
- config.before(new CreateClientProxyRegion(), CLIENT);
- config.before(new PrePopulateRegion(keyRange), SERVER);
- config.workload(new ExecuteParameterizedFunction(keyRange, functionIDRange), CLIENT);
+ TestConfig config = super.configure();
+ config.workload(new ExecuteParameterizedFunction(getKeyRange(), functionIDRange), CLIENT);
return config;
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionWithFiltersBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionWithFiltersBenchmark.java
index ba2fd76..d6440ca 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionWithFiltersBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedFunctionExecutionWithFiltersBenchmark.java
@@ -15,29 +15,17 @@
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.junit.jupiter.api.Test;
-import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
-import org.apache.geode.benchmark.tasks.CreatePartitionedRegion;
import org.apache.geode.benchmark.tasks.ExecuteFilteredFunction;
-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;
import org.apache.geode.perftest.TestRunners;
-public class PartitionedFunctionExecutionWithFiltersBenchmark implements PerformanceTest {
- private long keyRange = 1000000;
+public class PartitionedFunctionExecutionWithFiltersBenchmark
+ extends AbstractPartitionedFunctionBenchmark {
private long filterKeyRange = 1000;
- public PartitionedFunctionExecutionWithFiltersBenchmark() {}
-
- public void setKeyRange(long keyRange) {
- this.keyRange = keyRange;
- }
-
public void setFilterKeyRange(long filterKeyRange) {
this.filterKeyRange = filterKeyRange;
}
@@ -49,12 +37,8 @@ public class PartitionedFunctionExecutionWithFiltersBenchmark implements Perform
@Override
public TestConfig configure() {
- TestConfig config = GeodeBenchmark.createConfig();
- ClientServerTopology.configure(config);
- config.before(new CreatePartitionedRegion(), SERVER);
- config.before(new CreateClientProxyRegion(), CLIENT);
- config.before(new PrePopulateRegion(keyRange), SERVER);
- config.workload(new ExecuteFilteredFunction(keyRange, filterKeyRange), CLIENT);
+ TestConfig config = super.configure();
+ config.workload(new ExecuteFilteredFunction(getKeyRange(), filterKeyRange), CLIENT);
return config;
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionBenchmark.java
index 53f4790..7a11138 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionBenchmark.java
@@ -15,29 +15,16 @@
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.junit.jupiter.api.Test;
-import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
-import org.apache.geode.benchmark.tasks.CreateReplicatedRegion;
import org.apache.geode.benchmark.tasks.ExecuteFunction;
-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;
import org.apache.geode.perftest.TestRunners;
-public class ReplicatedFunctionExecutionBenchmark implements PerformanceTest {
- private long keyRange = 1000000;
+public class ReplicatedFunctionExecutionBenchmark extends AbstractReplicatedFunctionBenchmark {
private long functionIDRange = 1000;
- public ReplicatedFunctionExecutionBenchmark() {}
-
- public void setKeyRange(long keyRange) {
- this.keyRange = keyRange;
- }
-
public void setFunctionIDRange(long functionIDRange) {
this.functionIDRange = functionIDRange;
}
@@ -49,12 +36,8 @@ public class ReplicatedFunctionExecutionBenchmark implements PerformanceTest {
@Override
public TestConfig configure() {
- TestConfig config = GeodeBenchmark.createConfig();
- ClientServerTopology.configure(config);
- config.before(new CreateReplicatedRegion(), SERVER);
- config.before(new CreateClientProxyRegion(), CLIENT);
- config.before(new PrePopulateRegion(keyRange), SERVER);
- config.workload(new ExecuteFunction(keyRange, functionIDRange), CLIENT);
+ TestConfig config = super.configure();
+ config.workload(new ExecuteFunction(getKeyRange(), functionIDRange), CLIENT);
return config;
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionWithArgumentsBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionWithArgumentsBenchmark.java
index 99ce9b7..25710c4 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionWithArgumentsBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionWithArgumentsBenchmark.java
@@ -15,29 +15,17 @@
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.junit.jupiter.api.Test;
-import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
-import org.apache.geode.benchmark.tasks.CreateReplicatedRegion;
import org.apache.geode.benchmark.tasks.ExecuteParameterizedFunction;
-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;
import org.apache.geode.perftest.TestRunners;
-public class ReplicatedFunctionExecutionWithArgumentsBenchmark implements PerformanceTest {
- private long keyRange = 1000000;
+public class ReplicatedFunctionExecutionWithArgumentsBenchmark
+ extends AbstractReplicatedFunctionBenchmark {
private long functionIDRange = 1000;
- public ReplicatedFunctionExecutionWithArgumentsBenchmark() {}
-
- public void setKeyRange(long keyRange) {
- this.keyRange = keyRange;
- }
-
public void setFunctionIDRange(long functionIDRange) {
this.functionIDRange = functionIDRange;
}
@@ -49,12 +37,8 @@ public class ReplicatedFunctionExecutionWithArgumentsBenchmark implements Perfor
@Override
public TestConfig configure() {
- TestConfig config = GeodeBenchmark.createConfig();
- ClientServerTopology.configure(config);
- config.before(new CreateReplicatedRegion(), SERVER);
- config.before(new CreateClientProxyRegion(), CLIENT);
- config.before(new PrePopulateRegion(keyRange), SERVER);
- config.workload(new ExecuteParameterizedFunction(keyRange, functionIDRange), CLIENT);
+ TestConfig config = super.configure();
+ config.workload(new ExecuteParameterizedFunction(getKeyRange(), functionIDRange), CLIENT);
return config;
}
}
diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionWithFiltersBenchmark.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionWithFiltersBenchmark.java
index ecfc147..f1e5be5 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionWithFiltersBenchmark.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedFunctionExecutionWithFiltersBenchmark.java
@@ -15,29 +15,17 @@
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.junit.jupiter.api.Test;
-import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
-import org.apache.geode.benchmark.tasks.CreateReplicatedRegion;
import org.apache.geode.benchmark.tasks.ExecuteFilteredFunction;
-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;
import org.apache.geode.perftest.TestRunners;
-public class ReplicatedFunctionExecutionWithFiltersBenchmark implements PerformanceTest {
- private long keyRange = 1000000;
+public class ReplicatedFunctionExecutionWithFiltersBenchmark
+ extends AbstractReplicatedFunctionBenchmark {
private long filterKeyRange = 1000;
- public ReplicatedFunctionExecutionWithFiltersBenchmark() {}
-
- public void setKeyRange(long keyRange) {
- this.keyRange = keyRange;
- }
-
public void setFilterKeyRange(long filterKeyRange) {
this.filterKeyRange = filterKeyRange;
}
@@ -49,12 +37,8 @@ public class ReplicatedFunctionExecutionWithFiltersBenchmark implements Performa
@Override
public TestConfig configure() {
- TestConfig config = GeodeBenchmark.createConfig();
- ClientServerTopology.configure(config);
- config.before(new CreateReplicatedRegion(), SERVER);
- config.before(new CreateClientProxyRegion(), CLIENT);
- config.before(new PrePopulateRegion(keyRange), SERVER);
- config.workload(new ExecuteFilteredFunction(keyRange, filterKeyRange), CLIENT);
+ TestConfig config = super.configure();
+ config.workload(new ExecuteFilteredFunction(getKeyRange(), filterKeyRange), CLIENT);
return config;
}
}
diff --git a/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java b/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java
index 1ca4525..0c86347 100644
--- a/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java
+++ b/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java
@@ -32,7 +32,7 @@ import org.apache.geode.perftest.yardstick.YardstickTask;
public class WorkloadConfig implements Serializable {
long durationSeconds = 1;
long warmupSeconds = 0;
- int threads = Runtime.getRuntime().availableProcessors() * 16;
+ int threads = Runtime.getRuntime().availableProcessors() * 2;
public WorkloadConfig() {}