Skip to content

Attempt to add a benchmarking framework (JHM) #1

Attempt to add a benchmarking framework (JHM)

Attempt to add a benchmarking framework (JHM) #1

Workflow file for this run

name: Benchmark with JMH
on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Run benchmark
run: |
mvn clean install
mvn -f benchmark/pom.xml clean verify
java -jar benchmark/target/benchmarks.jar -rf json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: JMH Benchmark
tool: 'jmh'
output-file-path: jmh-result.json
# github-token: ${{ secrets.GITHUB_TOKEN }}
# Set auto-push to false since GitHub API token is not given
auto-push: false
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@TechnicJelle'