Repository navigation
chrono(benchmark): auto-update performance dashboard & SVG charts #28
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: zThread Continuous Performance Benchmark Suite | |
| on: | |
| push: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| # Single benchmark job — runs all JMH suites sequentially | |
| benchmarks: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.AUTO_COMMIT_PAT || github.token }} | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Compile Benchmark Module | |
| run: ./mvnw compile test-compile -pl zthread-benchmark --also-make -DskipTests=true | |
| - name: Run JMH Microbenchmarks | |
| run: | | |
| for suite in throughput eventfd inotify timers; do | |
| echo "::group::Running $suite benchmarks" | |
| ./mvnw test -pl zthread-benchmark --also-make -DskipTests=false -Dbenchmark.suite=$suite || true | |
| echo "::endgroup::" | |
| done | |
| continue-on-error: true | |
| - name: Run Scaling & Idle Benchmarks | |
| run: | | |
| for suite in scaling idle; do | |
| echo "::group::Running $suite benchmarks" | |
| ./mvnw test -pl zthread-benchmark --also-make -DskipTests=false -Dbenchmark.suite=$suite || true | |
| echo "::endgroup::" | |
| done | |
| continue-on-error: true | |
| - name: Upload Benchmark Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: benchmark-results | |
| path: zthread-benchmark/target/benchmark-results/*.json | |
| if-no-files-found: ignore | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Charting Dependencies | |
| run: pip install matplotlib pandas seaborn tabulate | |
| - name: Generate SVG Charts and Update README.md | |
| run: python3 scripts/generate_report.py | |
| if: github.ref == 'refs/heads/master' | |
| continue-on-error: true | |
| - name: Commit & Push Updated README & Benchmark Assets | |
| if: github.ref == 'refs/heads/master' | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chrono(benchmark): auto-update performance dashboard & SVG charts" | |
| file_pattern: "README.md assets/benchmarks/*" |