Skip to content

Commit

Permalink
bench
Browse files Browse the repository at this point in the history
  • Loading branch information
felldo committed Nov 17, 2023
1 parent b117b7a commit cef5bf7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 102 deletions.
69 changes: 34 additions & 35 deletions .github/workflows/jmh.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,45 @@
name: Benchmark
name: Minimal setup
on:
push:
branches:
- master
- testyml
pull_request:
branches:
- master
- testyml
# branches:
# - master
# - testyml
# - testmerge

permissions:
contents: write
pull-requests: write

jobs:
build:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
- uses: actions/setup-go@v4
with:
go-version: "stable"
# Run benchmark with `go test -bench` and stores the output to a file
- name: Run benchmark
run: go test -bench 'BenchmarkFib' | tee output.txt
# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark data
uses: actions/cache@v1
with:
java-version: '11'
distribution: 'adopt'
- name: Build and run JMH benchmark
run: |
./gradlew jmh
ls -a
cd lib
ls -a
cd build
ls -a
cd results
ls -a
cd jmh
ls -a
- name: JMH Benchmark Action
uses: kitlangton/jmh-benchmark-action@main
path: ./cache
key: ${{ runner.os }}-benchmark
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
jmh-output-path: ./lib/results.json
github-token: ${{ secrets.GITHUB_TOKEN }}
# What benchmark tool the output.txt came from
tool: 'jmh'
# Where the output from the benchmark tool is stored
output-file-path: lib/build/results/jmh/results.json
# Where the previous data file is stored
external-data-json-path: ./cache/benchmark-data.json
# Workflow will fail when an alert happens
fail-on-alert: true
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Enable alert commit comment
comment-on-alert: true
# Enable Job Summary for PRs
summary-always: true
# Mention @rhysd in the commit comment
alert-comment-cc-users: '@felldo'
# Upload the updated cache file for the next job by actions/cache
67 changes: 0 additions & 67 deletions lib/results.json

This file was deleted.

0 comments on commit cef5bf7

Please sign in to comment.