Add JMH to POM to factlitate performance testing and avoid future and
current PRs to clash in the POM.
@@ -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>
@@ -307,6 +319,7 @@ file comparators, endian transformation classes, and much more.
<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>
+ <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>
