Benchmarks #109
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Benchmarks | |
| on: | |
| schedule: | |
| - cron: '0 1 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # required for auto-push | |
| concurrency: | |
| group: benchmarks # serialize cron + manual runs | |
| cancel-in-progress: false | |
| jobs: | |
| benchmark: | |
| name: Execute JMH benchmarks | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '8' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Start Redis server | |
| run: | | |
| docker run --name redis-benchmark-test \ | |
| -p 6379:6379 \ | |
| -d redis:8.2.6 \ | |
| redis-server --requirepass foobared | |
| # Wait for Redis to be ready | |
| sleep 5 | |
| docker ps | grep redis-benchmark-test | |
| - name: Maven offline dependencies | |
| run: mvn -q dependency:go-offline | |
| - name: Run JMH benchmarks | |
| run: mvn -Pjmh clean test | |
| env: | |
| TERM: dumb | |
| - name: Stop Redis server | |
| if: always() | |
| run: docker rm -f redis-benchmark-test || true | |
| - name: Verify JMH output exists | |
| run: test -s benchmarks.json | |
| - name: Store benchmark result | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| tool: 'jmh' | |
| output-file-path: benchmarks.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: true | |
| gh-pages-branch: benchmark-data # NOT master | |
| benchmark-data-dir-path: 'jedis' # path inside that branch | |
| fail-on-alert: false | |
| alert-threshold: '200%' | |
| comment-on-alert: false | |
| alert-comment-cc-users: '@ggivo' |