Repository navigation
105 lines (92 loc) · 3.86 KB
/
Copy pathci-benchmarks.yml
File metadata and controls
105 lines (92 loc) · 3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: JMH Benchmarks
on:
workflow_dispatch:
schedule:
# Weekly, Sunday 04:00 UTC - distinct from ci-container.yml (daily 06:00)
# and prethink.yml (Monday 06:00) so runners aren't all queued together.
- cron: '0 4 * * 0'
permissions:
contents: read # default; the benchmarks job declares write explicitly
# Only one publish to gh-pages at a time; a manual dispatch overlapping the
# scheduled run would otherwise race pushing the benchmark-data commit.
concurrency:
group: jmh-benchmarks-gh-pages
cancel-in-progress: false
env:
DEV_JDK: '21'
# Kept small enough that both benchmark suites fit in the job timeout on a
# shared GitHub-hosted runner; not intended to produce publishable numbers,
# only a consistent trend line. See exist-core-jmh/README.md and
# exist-indexes-jmh/README.md for slower, more precise local invocations.
JMH_ARGS: '-wi 2 -i 5 -f 1'
jobs:
benchmarks:
name: Run JMH benchmarks
runs-on: ubuntu-latest
# Generous margin: several benchmarks were previously failing instantly
# (near-zero wall time) due to bugs fixed alongside this workflow change
# (missing Lucene index config, a broken conf.xml codegen path in
# exist-indexes-jmh) and will now run to their full configured duration.
# This is a report-only weekly/manual job that blocks no PR, so a longer
# timeout only costs CI minutes on a schedule, not developer time.
timeout-minutes: 180
permissions:
contents: write # github-action-benchmark pushes the data series to gh-pages
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: ${{ env.DEV_JDK }}
- uses: ./.github/actions/maven-cache
- name: Build exist-core-jmh
run: >
mvn -B install -Pperf-tests -pl exist-core-jmh -am -DskipTests
-Ddependency-check.skip=true -Ddocker=false
- name: Run exist-core-jmh benchmarks
run: >
mvn -B exec:exec -Pperf-tests -pl exist-core-jmh
-Dbenchmark.args="-rf json -rff target/jmh-result.json ${{ env.JMH_ARGS }}"
- name: Track exist-core-jmh results on gh-pages
if: github.repository == 'eXist-db/exist'
uses: benchmark-action/github-action-benchmark@v1
with:
name: 'exist-core-jmh'
tool: 'jmh'
output-file-path: exist-core-jmh/target/jmh-result.json
benchmark-data-dir-path: dev/bench/core
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Report-only: flag regressions, never fail the run.
alert-threshold: '150%'
comment-on-alert: true
fail-on-alert: false
summary-always: true
- name: Build exist-indexes-jmh
run: >
mvn -B install -Pperf-tests -pl exist-indexes-jmh -am -DskipTests
-Ddependency-check.skip=true -Ddocker=false
- name: Run exist-indexes-jmh benchmarks
run: >
mvn -B exec:exec -Pperf-tests -pl exist-indexes-jmh
-Dbenchmark.args="-rf json -rff target/jmh-result.json ${{ env.JMH_ARGS }}"
- name: Track exist-indexes-jmh results on gh-pages
if: github.repository == 'eXist-db/exist'
uses: benchmark-action/github-action-benchmark@v1
with:
name: 'exist-indexes-jmh'
tool: 'jmh'
output-file-path: exist-indexes-jmh/target/jmh-result.json
benchmark-data-dir-path: dev/bench/indexes
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '150%'
comment-on-alert: true
fail-on-alert: false
summary-always: true
- name: Save Maven cache
if: github.event_name == 'schedule'
uses: actions/cache/save@v6
with:
path: ~/.m2
key: maven-${{ github.ref_name }}-${{ hashFiles('**/pom.xml') }}