You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/01/23 16:30:05 UTC
[commons-io] branch master updated: Add JMH to POM to factlitate
performance testing and avoid future and current PRs to clash in the POM.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new 89d0c2d Add JMH to POM to factlitate performance testing and avoid future and current PRs to clash in the POM.
89d0c2d is described below
commit 89d0c2d64ef8f83e1de2132cf83cd5631e08429e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 23 11:29:59 2021 -0500
Add JMH to POM to factlitate performance testing and avoid future and
current PRs to clash in the POM.
---
pom.xml | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 53 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index bbc431f..6d453f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -271,6 +271,18 @@ file comparators, endian transformation classes, and much more.
<version>3.11</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.openjdk.jmh</groupId>
+ <artifactId>jmh-core</artifactId>
+ <version>${jmh.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openjdk.jmh</groupId>
+ <artifactId>jmh-generator-annprocess</artifactId>
+ <version>${jmh.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<properties>
@@ -306,7 +318,8 @@ file comparators, endian transformation classes, and much more.
<commons.surefire.version>3.0.0-M5</commons.surefire.version>
<commons.japicmp.version>0.15.2</commons.japicmp.version>
<spotbugs.plugin.version>4.2.0</spotbugs.plugin.version>
- <spotbugs.impl.version>4.2.0</spotbugs.impl.version>
+ <spotbugs.impl.version>4.2.0</spotbugs.impl.version>
+ <jmh.version>1.27</jmh.version>
<japicmp.skip>false</japicmp.skip>
<jacoco.skip>${env.JACOCO_SKIP}</jacoco.skip>
<commons.release.isDistModule>true</commons.release.isDistModule>
@@ -549,5 +562,44 @@ file comparators, endian transformation classes, and much more.
<coveralls.skip>true</coveralls.skip>
</properties>
</profile>
+ <profile>
+ <id>benchmark</id>
+ <properties>
+ <skipTests>true</skipTests>
+ <benchmark>org.apache</benchmark>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ <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.${benchmark}.json</argument>
+ <argument>${benchmark}</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>