[Fix] Remove non-existent --ingress-class flag from Helm controller template #34
Workflow file for this run
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: | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| benchmark: | |
| name: Run Benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| cache: true | |
| - name: Run benchmarks on PR branch | |
| run: | | |
| go test -bench=. -benchmem -count=5 ./internal/agent/router/... 2>&1 | tee new.bench | |
| go test -bench=. -benchmem -count=5 ./internal/agent/lb/... 2>&1 | tee -a new.bench | |
| go test -bench=. -benchmem -count=5 ./internal/agent/policy/... 2>&1 | tee -a new.bench | |
| - name: Checkout main branch | |
| run: | | |
| git stash | |
| git checkout origin/main | |
| - name: Run benchmarks on main branch | |
| run: | | |
| go test -bench=. -benchmem -count=5 ./internal/agent/router/... 2>&1 | tee old.bench | |
| go test -bench=. -benchmem -count=5 ./internal/agent/lb/... 2>&1 | tee -a old.bench | |
| go test -bench=. -benchmem -count=5 ./internal/agent/policy/... 2>&1 | tee -a old.bench | |
| - name: Install benchstat | |
| run: go install golang.org/x/perf/cmd/benchstat@latest | |
| - name: Compare benchmarks | |
| id: compare | |
| run: | | |
| benchstat old.bench new.bench > benchstat.txt | |
| cat benchstat.txt | |
| # Check for significant regressions (>10% slower) | |
| if grep -E '~\s+[0-9]+\.[0-9]+%\s+\+' benchstat.txt; then | |
| echo "::warning::Potential performance regression detected" | |
| fi | |
| # Save output for PR comment | |
| { | |
| echo 'BENCHSTAT<<EOF' | |
| cat benchstat.txt | |
| echo 'EOF' | |
| } >> $GITHUB_OUTPUT | |
| - name: Comment on PR | |
| if: github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const benchstat = fs.readFileSync('benchstat.txt', 'utf8'); | |
| const body = `## 📊 Benchmark Results | |
| \`\`\` | |
| ${benchstat} | |
| \`\`\` | |
| | Symbol | Meaning | | |
| |--------|---------| | |
| | ~ | No significant change | | |
| | + | Performance improved | | |
| | - | Performance regressed | | |
| `; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: body | |
| }); | |
| - name: Upload benchmark results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| path: | | |
| old.bench | |
| new.bench | |
| benchstat.txt | |
| retention-days: 30 |