Repository navigation
fix benchmark suite #18
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 ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| # Job 1: Isolated Matrix Microbenchmarks (Parallel) | |
| microbenchmarks: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| suite: [throughput, latency, memory, timers, eventfd, inotify, lifecycle] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Run Microbenchmark Suite | |
| run: ./mvnw test -pl zthread-benchmark -Dbenchmark.suite=${{ matrix.suite }} -DargLine="--enable-native-access=ALL-UNNAMED -XX:+UseZGC" | |
| continue-on-error: true | |
| - name: Upload Benchmark JSON Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-${{ matrix.suite }} | |
| path: target/benchmark-results/*.json | |
| # Job 2: Heavy Application & Scalability Benchmarks (Sequential / Dedicated) | |
| application-benchmarks: | |
| runs-on: ubuntu-latest | |
| needs: microbenchmarks | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 25 & Benchmark Tools | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| - name: Install Network Benchmark Harnesses | |
| run: sudo apt-get update && sudo apt-get install -y wrk sysstat iperf | |
| - name: Run Sequential Heavy Benchmarks (Socket, HTTP, WebSocket, Scaling, Idle) | |
| run: | | |
| ./mvnw test -pl zthread-benchmark -Dbenchmark.suite=socket | |
| ./mvnw test -pl zthread-benchmark -Dbenchmark.suite=http | |
| ./mvnw test -pl zthread-benchmark -Dbenchmark.suite=websocket | |
| ./mvnw test -pl zthread-benchmark -Dbenchmark.suite=scaling | |
| ./mvnw test -pl zthread-benchmark -Dbenchmark.suite=idle | |
| continue-on-error: true | |
| - name: Upload Heavy Benchmark Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-heavy | |
| path: target/benchmark-results/*.json | |
| # Job 3: Generate Dashboard, Visual Charts & Update README | |
| dashboard-update: | |
| runs-on: ubuntu-latest | |
| needs: [microbenchmarks, application-benchmarks] | |
| if: github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.AUTO_COMMIT_PAT || github.token }} | |
| - 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: Download All Benchmark Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: target/benchmark-results/ | |
| merge-multiple: true | |
| - name: Generate SVG Charts and Update README.md | |
| run: python3 scripts/generate_report.py | |
| - name: Commit & Push Updated README & Benchmark Assets | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chrono(benchmark): auto-update performance dashboard & SVG charts" | |
| file_pattern: "README.md assets/benchmarks/* target/benchmark-results/*.json" |