[ https://issues.apache.org/jira/browse/GEODE-4268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16323263#comment-16323263 ]
ASF GitHub Bot commented on GEODE-4268: --------------------------------------- nreich closed pull request #1263: GEODE-4268: Delete geode-benchmarks and move benchmarks to geode-core URL: https://github.com/apache/geode/pull/1263 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/geode-benchmarks/build.gradle b/geode-benchmarks/build.gradle deleted file mode 100644 index 1e51c7a8fd..0000000000 --- a/geode-benchmarks/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ - -apply plugin: "me.champeau.gradle.jmh" - -dependencies { - compile project(':geode-core') -} - -jmh { - duplicateClassesStrategy = 'warn' -} - -disableMavenPublishing() diff --git a/geode-core/build.gradle b/geode-core/build.gradle index 77c02ba83d..45e315a1e3 100755 --- a/geode-core/build.gradle +++ b/geode-core/build.gradle @@ -17,6 +17,7 @@ apply plugin: 'antlr' +apply plugin: 'me.champeau.gradle.jmh' sourceSets { jca { @@ -176,6 +177,11 @@ sourceSets { } } +jmh { + include = project.hasProperty('include') ? project.getProperties().get('include') : '.*' + duplicateClassesStrategy = 'warn' +} + // Creates the version properties file and writes it to the classes dir task createVersionPropertiesFile { def propertiesFile = file(generatedResources + "/org/apache/geode/internal/GemFireVersion.properties"); diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/CreateOnRegionBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/CreateOnRegionBenchmark.java similarity index 85% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/CreateOnRegionBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/CreateOnRegionBenchmark.java index d7e3319ca6..8cbd4ae051 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/CreateOnRegionBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/CreateOnRegionBenchmark.java @@ -12,7 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL; @@ -25,21 +25,12 @@ import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; -import org.openjdk.jmh.annotations.Param; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.TearDown; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.EvictionAction; -import org.apache.geode.cache.EvictionAttributes; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; -import org.apache.geode.internal.lang.SystemPropertyHelper; - /** * This benchmark measures the raw throughput of create actions on a region */ diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/CreateWithEvictionUnderLimitBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/CreateWithEvictionUnderLimitBenchmark.java similarity index 91% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/CreateWithEvictionUnderLimitBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/CreateWithEvictionUnderLimitBenchmark.java index 1be5ac37a1..4722e0333d 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/CreateWithEvictionUnderLimitBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/CreateWithEvictionUnderLimitBenchmark.java @@ -12,7 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL; @@ -32,12 +32,6 @@ import org.openjdk.jmh.annotations.TearDown; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.EvictionAction; -import org.apache.geode.cache.EvictionAttributes; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; import org.apache.geode.internal.lang.SystemPropertyHelper; /** diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/EvictionBasePerformanceBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/EvictionBasePerformanceBenchmark.java similarity index 91% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/EvictionBasePerformanceBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/EvictionBasePerformanceBenchmark.java index 757edd6d33..3cd1cbb400 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/EvictionBasePerformanceBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/EvictionBasePerformanceBenchmark.java @@ -12,7 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL; @@ -33,12 +33,6 @@ import org.openjdk.jmh.annotations.TearDown; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.EvictionAction; -import org.apache.geode.cache.EvictionAttributes; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; import org.apache.geode.internal.lang.SystemPropertyHelper; @State(Scope.Thread) diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/EvictionMultiThreadedPerformanceBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/EvictionMultiThreadedPerformanceBenchmark.java similarity index 93% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/EvictionMultiThreadedPerformanceBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/EvictionMultiThreadedPerformanceBenchmark.java index 9a904fc0e6..9eed9cb1f7 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/EvictionMultiThreadedPerformanceBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/EvictionMultiThreadedPerformanceBenchmark.java @@ -12,7 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL; @@ -34,12 +34,6 @@ import org.openjdk.jmh.annotations.Threads; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.EvictionAction; -import org.apache.geode.cache.EvictionAttributes; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; import org.apache.geode.internal.lang.SystemPropertyHelper; @State(Scope.Benchmark) diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/EvictionWithPartiallyMarkedListsBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/EvictionWithPartiallyMarkedListsBenchmark.java similarity index 91% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/EvictionWithPartiallyMarkedListsBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/EvictionWithPartiallyMarkedListsBenchmark.java index 43b08bacd6..27586a4a1f 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/EvictionWithPartiallyMarkedListsBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/EvictionWithPartiallyMarkedListsBenchmark.java @@ -12,7 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL; @@ -36,12 +36,6 @@ import org.openjdk.jmh.annotations.TearDown; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.EvictionAction; -import org.apache.geode.cache.EvictionAttributes; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; import org.apache.geode.internal.lang.SystemPropertyHelper; @State(Scope.Thread) diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/FirstEvictionBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/FirstEvictionBenchmark.java similarity index 90% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/FirstEvictionBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/FirstEvictionBenchmark.java index 37278d64d5..2fbbf7aeb2 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/FirstEvictionBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/FirstEvictionBenchmark.java @@ -12,7 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL; @@ -32,12 +32,6 @@ import org.openjdk.jmh.annotations.TearDown; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.EvictionAction; -import org.apache.geode.cache.EvictionAttributes; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; import org.apache.geode.internal.lang.SystemPropertyHelper; @State(Scope.Thread) diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/GetOnRegionBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/GetOnRegionBenchmark.java similarity index 92% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/GetOnRegionBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/GetOnRegionBenchmark.java index 50eb6f0738..6084b3aed2 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/GetOnRegionBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/GetOnRegionBenchmark.java @@ -12,7 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL; @@ -32,11 +32,6 @@ import org.openjdk.jmh.annotations.TearDown; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; - /** * This benchmark measures the raw throughput of get actions on a region */ diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/GetsWithEvictionPerformanceBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/GetsWithEvictionPerformanceBenchmark.java similarity index 91% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/GetsWithEvictionPerformanceBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/GetsWithEvictionPerformanceBenchmark.java index fb36c81261..246a831b2f 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/GetsWithEvictionPerformanceBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/GetsWithEvictionPerformanceBenchmark.java @@ -12,7 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL; @@ -33,12 +33,6 @@ import org.openjdk.jmh.annotations.TearDown; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.EvictionAction; -import org.apache.geode.cache.EvictionAttributes; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; import org.apache.geode.internal.lang.SystemPropertyHelper; /** diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/RangeQueryWithIndexBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/RangeQueryWithIndexBenchmark.java similarity index 88% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/RangeQueryWithIndexBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/RangeQueryWithIndexBenchmark.java index 83b0fc482b..d4b68796fb 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/RangeQueryWithIndexBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/RangeQueryWithIndexBenchmark.java @@ -12,11 +12,10 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.junit.Assert.assertEquals; -import java.util.List; import java.util.stream.IntStream; import org.openjdk.jmh.annotations.Benchmark; @@ -27,17 +26,10 @@ import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; import org.apache.geode.cache.query.FunctionDomainException; -import org.apache.geode.cache.query.IndexExistsException; -import org.apache.geode.cache.query.IndexNameConflictException; import org.apache.geode.cache.query.NameResolutionException; import org.apache.geode.cache.query.Query; import org.apache.geode.cache.query.QueryInvocationTargetException; -import org.apache.geode.cache.query.RegionNotFoundException; import org.apache.geode.cache.query.SelectResults; import org.apache.geode.cache.query.TypeMismatchException; import org.apache.geode.cache.query.internal.index.AbstractIndex; diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/RegionOperationBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/RegionOperationBenchmark.java similarity index 81% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/RegionOperationBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/RegionOperationBenchmark.java index c9d0d182d0..21b70e1bdd 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/RegionOperationBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/RegionOperationBenchmark.java @@ -12,11 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; - -import static org.junit.Assert.*; - -import java.util.stream.IntStream; +package org.apache.geode.cache; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.Fork; @@ -26,17 +22,10 @@ import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; import org.apache.geode.cache.query.FunctionDomainException; import org.apache.geode.cache.query.NameResolutionException; -import org.apache.geode.cache.query.Query; import org.apache.geode.cache.query.QueryInvocationTargetException; -import org.apache.geode.cache.query.SelectResults; import org.apache.geode.cache.query.TypeMismatchException; -import org.apache.geode.cache.query.internal.index.AbstractIndex; @Fork(10) public class RegionOperationBenchmark { diff --git a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/UpdateOnRegionBenchmark.java b/geode-core/src/jmh/java/org/apache/geode/cache/UpdateOnRegionBenchmark.java similarity index 86% rename from geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/UpdateOnRegionBenchmark.java rename to geode-core/src/jmh/java/org/apache/geode/cache/UpdateOnRegionBenchmark.java index ad4b677488..a0f9d498ee 100644 --- a/geode-benchmarks/src/jmh/java/org/apache/geode/cache/benchmark/UpdateOnRegionBenchmark.java +++ b/geode-core/src/jmh/java/org/apache/geode/cache/UpdateOnRegionBenchmark.java @@ -12,7 +12,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package org.apache.geode.cache.benchmark; +package org.apache.geode.cache; import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL; @@ -26,21 +26,12 @@ import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; -import org.openjdk.jmh.annotations.Param; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.TearDown; import org.openjdk.jmh.annotations.Warmup; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.EvictionAction; -import org.apache.geode.cache.EvictionAttributes; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.RegionShortcut; -import org.apache.geode.internal.lang.SystemPropertyHelper; - @State(Scope.Thread) @Fork(1) public class UpdateOnRegionBenchmark { diff --git a/settings.gradle b/settings.gradle index 1550266eef..1b16200ce9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -31,7 +31,6 @@ include 'geode-old-client-support' include 'geode-wan' include 'geode-cq' include 'geode-connectors' -include 'geode-benchmarks' include 'geode-client-protocol' include 'extensions/geode-modules' include 'extensions/geode-modules-tomcat7' ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Move jmh benchmarks to geode-code > --------------------------------- > > Key: GEODE-4268 > URL: https://issues.apache.org/jira/browse/GEODE-4268 > Project: Geode > Issue Type: Improvement > Components: core > Reporter: Nick Reich > > Instead of having all jmh benchmarks in their own module, add them to the > module where the codd they benchmark resides. -- This message was sent by Atlassian JIRA (v6.4.14#64029)