Skip to content

Commit 3fb1454

Browse files
committed
Tweak smoketest params and add version benchmark action
1 parent cb512aa commit 3fb1454

File tree

3 files changed

+90
-8
lines changed

3 files changed

+90
-8
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Version Benchmarks
2+
3+
on:
4+
# Manual trigger
5+
workflow_dispatch:
6+
7+
# Daily at 3am UTC
8+
schedule:
9+
- cron: '0 3 * * *'
10+
11+
# Triggered from lmdbjava/lmdbjava repository
12+
repository_dispatch:
13+
types: [lmdbjava-release, lmdbjava-commit]
14+
15+
# Also run when benchmark scripts change
16+
push:
17+
branches: [master]
18+
paths:
19+
- '.github/workflows/version-benchmarks.yml'
20+
- 'run-vers.sh'
21+
- 'report-vers.sh'
22+
23+
jobs:
24+
benchmark:
25+
name: Run Version Regression Benchmarks
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 120
28+
29+
steps:
30+
- name: Check out repository
31+
uses: actions/checkout@v5
32+
33+
- name: Set up JDK
34+
uses: actions/setup-java@v5
35+
with:
36+
java-version: '25'
37+
distribution: 'temurin'
38+
cache: maven
39+
40+
- name: Build benchmarks JAR
41+
run: mvn -B clean package -DskipTests
42+
43+
- name: Install dependencies for report generation
44+
run: sudo apt-get update && sudo apt-get install -y gnuplot jq
45+
46+
- name: Run version regression benchmarks (smoketest mode)
47+
run: ./run-vers.sh smoketest
48+
timeout-minutes: 60
49+
50+
- name: Generate version regression report
51+
run: ./report-vers.sh
52+
53+
- name: Add deployment timestamp
54+
run: |
55+
echo "<p style='text-align: center; color: #666; font-size: 0.9em; margin-top: 2em;'>Last updated: $(date -u '+%Y-%m-%d %H:%M:%S UTC')</p>" >> target/benchmark/README.md
56+
57+
- name: Deploy to Cloudflare Pages
58+
uses: cloudflare/pages-action@v1
59+
with:
60+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
61+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
62+
projectName: lmdbjava-version-benchmarks
63+
directory: target/benchmark
64+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
65+
branch: main
66+
67+
- name: Upload benchmark artifacts (backup)
68+
uses: actions/upload-artifact@v4
69+
if: always()
70+
with:
71+
name: version-benchmark-results-${{ github.run_number }}
72+
path: target/benchmark/
73+
retention-days: 90
74+
75+
- name: Comment deployment URL on manual trigger
76+
if: github.event_name == 'workflow_dispatch'
77+
uses: actions/github-script@v7
78+
with:
79+
script: |
80+
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
81+
console.log(`Deployment triggered manually. Check deployment at: https://version-benchmark.lmdbjava.org`);
82+
console.log(`Workflow run: ${runUrl}`);

run-libs.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ echo "Detected RAM: ${TOTAL_RAM_GB} GB"
4040

4141
case $MODE in
4242
smoketest)
43-
# Fixed small dataset for verification
44-
ITER_OPTS="-wi 1 -i 1 -f 1"
45-
R_OPTS="-r 5s"
43+
# Fixed small dataset for verification (fast, no warmup)
44+
ITER_OPTS="-wi 0 -i 1 -f 1"
45+
R_OPTS="-r 3s"
4646

4747
# Fixed 1K entries for all runs
4848
NUM_RUN1=1000
@@ -56,7 +56,7 @@ case $MODE in
5656
;;
5757

5858
benchmark)
59-
# Production benchmark with RAM-based scaling
59+
# Production benchmark with RAM-based scaling and full warmup
6060
ITER_OPTS="-wi 3 -i 3 -f 3"
6161
R_OPTS="-r 120s"
6262

@@ -121,7 +121,7 @@ esac
121121

122122
# Single-shot benchmarks settings (align with main benchmark mode)
123123
if [ "$MODE" = "smoketest" ]; then
124-
SS_OPTS="-bm ss -wi 1 -i 1 -f 1"
124+
SS_OPTS="-bm ss -wi 0 -i 1 -f 1"
125125
else
126126
SS_OPTS="-bm ss -wi 3 -i 3 -f 3"
127127
fi

run-vers.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ BRANCH_VERSIONS=(master)
4444

4545
case $MODE in
4646
smoketest)
47-
# Fixed small dataset for verification
48-
ITER_OPTS="-wi 1 -i 1 -f 1"
49-
R_OPTS="-r 5s"
47+
# Fixed small dataset for verification (fast, no warmup)
48+
ITER_OPTS="-wi 0 -i 1 -f 1"
49+
R_OPTS="-r 3s"
5050
NUM_ENTRIES=1000
5151
echo "Running in SMOKETEST mode (1K entries, fast verification)"
5252
;;

0 commit comments

Comments
 (0)