Skip to content

Commit

Permalink
apacheGH-41471: [Java] Fix performance uber-jar (apache#41473)
Browse files Browse the repository at this point in the history
### Rationale for this change

Performance `benchmarks.jar` uber-jar is mostly empty and is missing critical metadata information which would allow someone to run performance benchmarks using a simple commandline like:

```
$ java -cp performance/target/benchmarks.jar ArrowBufBenchmarks
```

### What changes are included in this PR?

Move benchmark classes from `src/test/java` to `src/main/java` and change the dependencies' scope as well so that `maven-shade-plugin` can actually pick up the classes to package.

Also add missing jmh annotation generator to `maven-compiler-plugin` so that JMH metadata can be generated

### Are these changes tested?

Local testing only.

### Are there any user-facing changes?

I didn't find any user-facing documentation regarding JMH benchmarks. If there are some, it may be helpful to include a simplified command line

* GitHub Issue: apache#41471

Authored-by: Laurent Goujon <[email protected]>
Signed-off-by: David Li <[email protected]>
  • Loading branch information
laurentgo authored and tolleybot committed May 4, 2024
1 parent 8b02cac commit 1171234
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions java/performance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,61 +40,61 @@
<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>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-vector</artifactId>
<classifier>${arrow.vector.classifier}</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-netty</artifactId>
<scope>test</scope>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${dep.avro.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-avro</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.224</version>
<scope>test</scope>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-jdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-algorithm</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${jmh.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down

0 comments on commit 1171234

Please sign in to comment.