Skip to content

Benchmark

Benchmark #10

Workflow file for this run

name: Benchmark
on:
workflow_dispatch: # Manual trigger
jobs:
benchmark:
name: Performance check
runs-on: ubuntu-latest
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: coursier/setup-action@main
with:
jvm: temurin@17
apps: mill
# Run benchmark with `go test -bench` and stores the output to a file
- name: Run benchmark
run: mill benchmark.runJmh -jvmArgs --add-modules=jdk.incubator.vector -rf json
# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark-${{ github.ref }}
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'jmh'
output-file-path: out/benchmark/runJmh.dest/jmh-result.json
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: true
ref: ${{ github.sha }}
skip-fetch-gh-pages: true
github-token: ${{ secrets.GITHUB_TOKEN }}
# Save the benchmark result to cache - we always want to do this, which is not the default cache behavior
- name: Save branch results
uses: actions/cache/save@v4
with:
path: out/benchmark/runJmh.dest/jmh-result.json
key: ${{ runner.os }}-benchmark-${{ github.ref }}