diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 66284e7e3..a560acf52 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,13 +1,29 @@ name: Benchmarks on: +# push: +# paths-ignore: +# - 'docs/**' +# - '**/*.md' +# - '**/*.rst' +# branches: +# - main +# - '[0-9].*' +# pull_request: +# branches: +# - main +# - '[0-9].*' schedule: - cron: '0 1 * * *' # nightly build workflow_dispatch: +#permissions: + # For commenting alerts on commits + # contents: write + jobs: benchmark: - name: Build and Test + name: Execute benchmarks runs-on: ubuntu-latest steps: - name: Checkout project @@ -54,12 +70,14 @@ jobs: - name: Store benchmark result uses: benchmark-action/github-action-benchmark@v1 with: - # What benchmark tool the output.txt came from + github-token: ${{ secrets.GITHUB_TOKEN }} tool: 'jmh' - # Where the output from the benchmark tool is stored + auto-push: true + gh-repository: 'github.com/redis/lettuce' + gh-pages-branch: 'benchmarks' + benchmark-data-dir-path: './' output-file-path: benchmark.log - # Where the previous data file is stored - external-data-json-path: ./cache/benchmark.log - # Workflow will fail when an alert happens - fail-on-alert: true - # Upload the updated cache file for the next job by actions/cache + fail-on-alert: false + alert-threshold: '200%' + alert-comment-cc-users: '@tishun' + # comment-on-alert: true diff --git a/pom.xml b/pom.xml index 710d1f359..2838145a7 100644 --- a/pom.xml +++ b/pom.xml @@ -557,6 +557,22 @@ 1.20.1 test + + + + + org.openjdk.jmh + jmh-core + 1.21 + test + + + org.openjdk.jmh + jmh-generator-annprocess + 1.21 + test + + @@ -1234,19 +1250,66 @@ org.openjdk.jmh.Main .* -tu + ns -f + 1 -wi + 10 -w + 1 -r + 1 -i + 10 -bm + avgt + -rf + + json + -rff + + benchmarks.json