summaryrefslogtreecommitdiff
path: root/core/pom.xml
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2024-06-23 16:24:11 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2024-06-23 16:24:11 +0200
commit47df8be6dc1e0927a7b3d690100445865dfa8675 (patch)
tree06587663e86e296156872d331e7aa1be69624884 /core/pom.xml
parentb69b3017699b960ff5133b8ec34bff786bec0f77 (diff)
test: Add benchmarks.
The benchmarks can be run using 'mvn verify -Pbenchmark'. Change-Id: I13058f52bea77aa3cb4f1967126c28e1e98d1838
Diffstat (limited to 'core/pom.xml')
-rw-r--r--core/pom.xml72
1 files changed, 71 insertions, 1 deletions
diff --git a/core/pom.xml b/core/pom.xml
index a75acd5..38f7ea5 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -55,12 +55,38 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<version>5.10.2</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.openjdk.jmh</groupId>
+ <artifactId>jmh-core</artifactId>
+ <version>1.35</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openjdk.jmh</groupId>
+ <artifactId>jmh-generator-annprocess</artifactId>
+ <version>1.35</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
<plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>org.openjdk.jmh</groupId>
+ <artifactId>jmh-generator-annprocess</artifactId>
+ <version>1.35</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
@@ -73,10 +99,54 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
- <version>3.2.5</version>
</plugin>
</plugins>
</build>
+ <profiles>
+
+ <profile>
+ <id>benchmark</id>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-benchmarks</id>
+ <phase>integration-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>.*</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+
</project>