Skip to content

Commit c55e372

Browse files
committed
Modernise to Java 25, standalone POM and lz4-java xxHash32
See See https://lz4.github.io/lz4-java/1.3.0/xxhash-benchmark for choice of xxHash32 via JNI over alternatives.
1 parent ff4f2b5 commit c55e372

13 files changed

Lines changed: 260 additions & 310 deletions

File tree

.github/workflows/maven.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ on:
88

99
jobs:
1010
build:
11-
name: Java 11 Build and Verify
11+
name: Java LTS Build and Verify
1212
runs-on: ubuntu-latest
1313

1414
steps:
1515
- name: Check out Git repository
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v5
1717

18-
- name: Set up Java and Maven
19-
uses: actions/setup-java@v3
18+
- name: Set up JDK
19+
uses: actions/setup-java@v5
2020
with:
21-
distribution: zulu
22-
java-version: 11
21+
java-version: '25'
22+
distribution: 'temurin'
2323
cache: maven
2424

25-
- name: Setup HTTPS mirror proxy for Maven Central (due to Chroncile Map POM)
26-
uses: s4u/maven-settings-action@v2.8.0
27-
with:
28-
mirrors: '[{"id": "central-https-mirror", "name": "HTTPS Mirror of Maven Central", "mirrorOf": "central", "url": "https://repo1.maven.org/maven2"}]'
29-
3025
- name: Build with Maven
3126
run: mvn -B verify
3227

3328
- name: Simple benchmark test
34-
run: java -jar target/benchmarks.jar -foe true -wi 0 -i 1 -f 1 -p num=512
29+
run: |
30+
java --add-opens java.base/java.lang.reflect=ALL-UNNAMED \
31+
--add-opens java.base/java.nio=ALL-UNNAMED \
32+
--add-opens java.base/sun.nio.ch=ALL-UNNAMED \
33+
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
34+
-jar target/benchmarks.jar -foe true -wi 0 -i 1 -f 1 -p num=512

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ bin
1212
*.tag
1313
*.next
1414
*.jfr
15+
pom.xml.versionsBackup
16+
dependency-reduced-pom.xml

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,29 @@ consistent, some libraries offer non-obvious tuning settings or usage patterns
4747
that might further reduce their latency. We do not claim we have exhausted
4848
every tuning option every library exposes, but pull requests are most welcome.
4949

50+
## Build
51+
52+
Clone this repository and build:
53+
54+
```bash
55+
mvn clean package
56+
```
57+
5058
## Usage
59+
5160
This benchmark uses POSIX calls to accurately determine consumed disk space and
5261
only depends on Linux-specific native library wrappers where a range of such
5362
wrappers exists. Operation on non-Linux operating systems is unsupported.
5463

55-
1. Clone this repository and `mvn clean package`
56-
2. Run the benchmark with `java -jar target/benchmarks.jar`
64+
Run the benchmark:
65+
66+
```bash
67+
java --add-opens java.base/java.lang.reflect=ALL-UNNAMED \
68+
--add-opens java.base/java.nio=ALL-UNNAMED \
69+
--add-opens java.base/sun.nio.ch=ALL-UNNAMED \
70+
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
71+
-jar target/benchmarks.jar
72+
```
5773

5874
The benchmark offers many parameters, but to reduce execution time they default
5975
to a fast, mechanically-sympathetic workload (ie integer keys, sequential IO)
@@ -79,6 +95,14 @@ sparse files are typical), but the actual on-disk space used. The underlying
7995
storage location defaults to the temporary file system. To force an alternate
8096
location, invoke Java with `-Djava.io.tmpdir=/somewhere/you/like`.
8197

98+
## Version Management
99+
100+
Update all dependency and plugin versions:
101+
102+
```bash
103+
mvn versions:update-properties
104+
```
105+
82106
## Support
83107

84108
Please [open a GitHub issue](https://github.com/lmdbjava/benchmarks/issues)

0 commit comments

Comments
 (0)