From efbebe8c0cb6b09d605987c1acaad0c543c1cd0a Mon Sep 17 00:00:00 2001 From: Jens Wilke Date: Thu, 14 Oct 2021 15:28:10 +0200 Subject: [PATCH] strip unneeded dependencies from JMH shaded jar --- jmh-suite/pom.xml | 44 +++++++++++++++++-- .../jmh/MiscResultRecorderProfiler.java | 4 +- pom.xml | 14 ++---- testbed/pom.xml | 11 +++++ thirdparty/pom.xml | 17 ++----- util/pom.xml | 2 +- 6 files changed, 61 insertions(+), 31 deletions(-) diff --git a/jmh-suite/pom.xml b/jmh-suite/pom.xml index 0de1023..ce4fe57 100644 --- a/jmh-suite/pom.xml +++ b/jmh-suite/pom.xml @@ -30,10 +30,12 @@ ${project.groupId} testbed ${project.version} + - org.cache2k.benchmark - traces + * + * @@ -41,10 +43,12 @@ ${project.groupId} thirdparty ${project.version} + - com.github.ben-manes.caffeine - simulator + * + * @@ -52,6 +56,14 @@ ${project.groupId} util ${project.version} + + + + * + * + + org.openjdk.jmh @@ -64,16 +76,40 @@ ${jmh.version} provided + org.cache2k cache2k-core ${cache2k-version} + + + com.github.ben-manes.caffeine + caffeine + ${caffeine-version} + + + org.ehcache + ehcache + ${ehcache3-version} + + + javax.cache + cache-api + 1.1.0 + + + + it.unimi.dsi + dsiutils + ${dsiutils-version} + diff --git a/jmh-suite/src/main/java/org/cache2k/benchmark/jmh/MiscResultRecorderProfiler.java b/jmh-suite/src/main/java/org/cache2k/benchmark/jmh/MiscResultRecorderProfiler.java index 7ef0e65..1d0159b 100644 --- a/jmh-suite/src/main/java/org/cache2k/benchmark/jmh/MiscResultRecorderProfiler.java +++ b/jmh-suite/src/main/java/org/cache2k/benchmark/jmh/MiscResultRecorderProfiler.java @@ -20,7 +20,6 @@ * #L% */ -import org.infinispan.util.concurrent.ConcurrentHashSet; import org.openjdk.jmh.infra.BenchmarkParams; import org.openjdk.jmh.infra.IterationParams; import org.openjdk.jmh.profile.InternalProfiler; @@ -36,6 +35,7 @@ import java.util.Collection; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.CopyOnWriteArraySet; import java.util.concurrent.TimeUnit; /** @@ -51,7 +51,7 @@ public class MiscResultRecorderProfiler implements InternalProfiler { * Collection of multiple results per metric, possibly multiple for an iteration, * e.g. reported by threads */ - static final ConcurrentHashSet> resultSet = new ConcurrentHashSet<>(); + static final Collection> resultSet = new CopyOnWriteArraySet<>(); /** * Collection of a single result per metric */ diff --git a/pom.xml b/pom.xml index e652da2..2cb2307 100644 --- a/pom.xml +++ b/pom.xml @@ -28,6 +28,9 @@ UTF-8 2.2.1.Final + 3.9.6 + 3.0.4 + 2.6.0 @@ -40,17 +43,6 @@ - - junit - junit - 4.12 - - - org.hamcrest - hamcrest-library - 1.2.1 - test - diff --git a/testbed/pom.xml b/testbed/pom.xml index 52cace5..f67487d 100644 --- a/testbed/pom.xml +++ b/testbed/pom.xml @@ -65,6 +65,17 @@ jackson-databind 2.1.3 + + junit + junit + 4.12 + + + org.hamcrest + hamcrest-library + 1.2.1 + test + diff --git a/thirdparty/pom.xml b/thirdparty/pom.xml index caf26c5..aae2520 100644 --- a/thirdparty/pom.xml +++ b/thirdparty/pom.xml @@ -13,10 +13,6 @@ Benchmarks: third party products. - - 3.0.4 - - ${project.groupId} @@ -38,15 +34,10 @@ guava 26.0-jre - - org.infinispan - infinispan-core - 7.1.0.CR2 - org.ehcache ehcache - 3.9.6 + ${ehcache3-version} javax.cache @@ -56,17 +47,17 @@ com.github.ben-manes.caffeine caffeine - ${caffeine.version} + ${caffeine-version} com.github.ben-manes.caffeine jcache - ${caffeine.version} + ${caffeine-version} com.github.ben-manes.caffeine simulator - ${caffeine.version} + ${caffeine-version} org.cache2k diff --git a/util/pom.xml b/util/pom.xml index 1e99fa3..5f10f1c 100644 --- a/util/pom.xml +++ b/util/pom.xml @@ -16,7 +16,7 @@ it.unimi.dsi dsiutils - 2.6.0 + ${dsiutils-version} org.apache.commons