From 4073b10bbecef1feda641f291d312071d6675f17 Mon Sep 17 00:00:00 2001 From: Denis Zhdanov Date: Mon, 16 Apr 2018 01:39:16 +0300 Subject: [PATCH] BAEL-1423 Java Concurrency Utility with JCTools library Addressed editor's comments --- jctools/README.md | 11 -- jctools/pom.xml | 108 ------------------ libraries/pom.xml | 45 ++++++++ .../com/baeldung/jctools/MpmcBenchmark.java | 0 .../main/java/com/baeldung/jctools/README.md | 7 ++ .../com/baeldung/jctools/JCToolsUnitTest.java | 0 6 files changed, 52 insertions(+), 119 deletions(-) delete mode 100644 jctools/README.md delete mode 100644 jctools/pom.xml rename {jctools => libraries}/src/main/java/com/baeldung/jctools/MpmcBenchmark.java (100%) create mode 100644 libraries/src/main/java/com/baeldung/jctools/README.md rename {jctools => libraries}/src/test/java/com/baeldung/jctools/JCToolsUnitTest.java (100%) diff --git a/jctools/README.md b/jctools/README.md deleted file mode 100644 index 181e45c1ca..0000000000 --- a/jctools/README.md +++ /dev/null @@ -1,11 +0,0 @@ -## Overview - -This project holds a [couple of tests](./src/test/java/com/baeldung/jctools/JCToolsUnitTest.java) which illustrate JCTools specifics and a [benchmark](./src/main/java/com/baeldung/jctools/MpmcBenchmark.java) in the [JMH](http://openjdk.java.net/projects/code-tools/jmh/) format. - -## How to build and run the JMH benchmark - -Execute the following from the project's root: -```bash -mvn clean install -java -jar ./target/benchmarks.jar MpmcBenchmark -si true -``` \ No newline at end of file diff --git a/jctools/pom.xml b/jctools/pom.xml deleted file mode 100644 index 8a21c610de..0000000000 --- a/jctools/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ - - 4.0.0 - - com.baeldung - jctools - 0.0.1-SNAPSHOT - - jctools - - - - org.jctools - jctools-core - ${jctools.version} - - - - org.openjdk.jmh - jmh-core - ${jmh.version} - - - - org.openjdk.jmh - jmh-generator-annprocess - ${jmh.version} - provided - - - - junit - junit - 4.12 - test - - - - org.assertj - assertj-core - ${assertj.version} - test - - - - - 2.1.2 - 3.9.1 - 1.20 - - 1.8 - - benchmarks - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - ${javac.target} - ${javac.target} - ${javac.target} - - - - - - org.apache.maven.plugins - maven-shade-plugin - 2.2 - - - package - - shade - - - ${uberjar.name} - - - org.openjdk.jmh.Main - - - - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - - - - - \ No newline at end of file diff --git a/libraries/pom.xml b/libraries/pom.xml index 6ff06d7285..8a3a27cec4 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -661,6 +661,12 @@ fugue 4.5.1 + + + org.jctools + jctools-core + ${jctools.version} + @@ -780,6 +786,44 @@ 1.8 + + + + org.apache.maven.plugins + maven-shade-plugin + 2.2 + + + package + + shade + + + benchmarks + + + org.openjdk.jmh.Main + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + @@ -850,6 +894,7 @@ 2.2.0 9.1.5.Final 1.4.9 + 2.1.2 diff --git a/jctools/src/main/java/com/baeldung/jctools/MpmcBenchmark.java b/libraries/src/main/java/com/baeldung/jctools/MpmcBenchmark.java similarity index 100% rename from jctools/src/main/java/com/baeldung/jctools/MpmcBenchmark.java rename to libraries/src/main/java/com/baeldung/jctools/MpmcBenchmark.java diff --git a/libraries/src/main/java/com/baeldung/jctools/README.md b/libraries/src/main/java/com/baeldung/jctools/README.md new file mode 100644 index 0000000000..3c1b3c1c1e --- /dev/null +++ b/libraries/src/main/java/com/baeldung/jctools/README.md @@ -0,0 +1,7 @@ +## How to build and run the JMH benchmark + +Execute the following from the project's root: +```bash +mvn clean install +java -jar ./target/benchmarks.jar MpmcBenchmark -si true +``` \ No newline at end of file diff --git a/jctools/src/test/java/com/baeldung/jctools/JCToolsUnitTest.java b/libraries/src/test/java/com/baeldung/jctools/JCToolsUnitTest.java similarity index 100% rename from jctools/src/test/java/com/baeldung/jctools/JCToolsUnitTest.java rename to libraries/src/test/java/com/baeldung/jctools/JCToolsUnitTest.java