-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 2.07 KB
/
Copy pathbenchmarks.yml
File metadata and controls
77 lines (66 loc) · 2.07 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
name: Performance Benchmarks
on:
# Run on releases
release:
types: [published]
# Allow manual trigger
workflow_dispatch:
inputs:
benchmark_filter:
description: 'JMH benchmark filter (regex pattern, e.g. MessageBus)'
required: false
default: ''
fork_count:
description: 'Number of JMH forks'
required: false
default: '2'
jobs:
benchmarks:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Checkout
uses: actions/checkout@v4
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build platform (skip tests for speed)
run: mvn -DskipTests clean install
- name: Run JMH Benchmarks
run: |
cd platform-benchmarks
FILTER="${{ github.event.inputs.benchmark_filter }}"
FORKS="${{ github.event.inputs.fork_count }}"
FORKS="${FORKS:-2}"
ARGS="-rf json -rff target/jmh-result.json -f ${FORKS}"
if [ -n "$FILTER" ]; then
ARGS="$ARGS $FILTER"
fi
java -jar target/benchmarks.jar $ARGS
- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
with:
name: jmh-results
path: platform-benchmarks/target/jmh-result.json
retention-days: 90
- name: Store Benchmark Results
if: github.event_name == 'release'
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'jmh'
output-file-path: platform-benchmarks/target/jmh-result.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '150%'
comment-on-alert: true
fail-on-alert: false