Repository: commons-rng Updated Branches: refs/heads/master ed083eaf2 -> 05f49b3d6
JMH benchmarking enabled in "pom.xml". Thanks to Artem Barger. Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/883b17fe Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/883b17fe Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/883b17fe Branch: refs/heads/master Commit: 883b17fe9759ffd34e145558c6aa6ddb15f6f6c8 Parents: ed083ea Author: Gilles <er...@apache.org> Authored: Tue Aug 9 22:45:40 2016 +0200 Committer: Gilles <er...@apache.org> Committed: Tue Aug 9 22:45:40 2016 +0200 ---------------------------------------------------------------------- pom.xml | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-rng/blob/883b17fe/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index f28fcb0..f1d370c 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.apache.commons</groupId> <artifactId>commons-rng</artifactId> + <packaging>jar</packaging> <version>0.1-SNAPSHOT</version> <name>Apache Commons Rng</name> @@ -66,6 +67,19 @@ <dependencies> <dependency> + <groupId>org.openjdk.jmh</groupId> + <artifactId>jmh-core</artifactId> + <version>${jmh.version}</version> + </dependency> + + <dependency> + <groupId>org.openjdk.jmh</groupId> + <artifactId>jmh-generator-annprocess</artifactId> + <version>${jmh.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> @@ -117,6 +131,10 @@ <!-- Override default buildNumber timestamp format, needed for coveralls plugin --> <maven.buildNumber.timestampFormat>{0,date,yyyy-MM-dd HH:mm:ssZ}</maven.buildNumber.timestampFormat> + + <!-- JMH Benchmark related properties, version, target compiler and name of the benchmarking uber jar. --> + <jmh.version>1.13</jmh.version> + <uberjar.name>benchmarks</uberjar.name> </properties> <build> @@ -516,5 +534,55 @@ </plugins> </build> </profile> + + <profile> + <id>benchmark</id> + <properties> + <skipTests>true</skipTests> + <benchmark>org.apache</benchmark> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.1</version> + <configuration> + <compilerVersion>${maven.compiler.target}</compilerVersion> + <source>${maven.compiler.target}</source> + <target>${maven.compiler.target}</target> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <executions> + <execution> + <id>benchmark</id> + <phase>test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <classpathScope>test</classpathScope> + <executable>java</executable> + <arguments> + <argument>-classpath</argument> + <classpath/> + <argument>org.openjdk.jmh.Main</argument> + <argument>-rf</argument> + <argument>json</argument> + <argument>-rff</argument> + <argument>target/jmh-result.json</argument> + <argument>${benchmark}</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> </profiles> </project>