Skip to content

🌱 add benchmark pipeline #7

🌱 add benchmark pipeline

🌱 add benchmark pipeline #7

Workflow file for this run

name: Benchmark Test
on:
pull_request:
branches:
- main
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install dependencies
run: |
go mod download
go mod tidy
# - name: Debug via SSH
# uses: mxschmitt/action-tmate@v3
# ToDo: log in the clsuter. Otherwise, it fails since failed to create ClusterCatalog
- name: Run benchmark
working-directory: test/e2e
run: |
pwd
ls -la
export CATALOG_IMG=registry.redhat.io/redhat/redhat-operator-index:v4.18
go clean -testcache
set -x
go test -v -run=^$ -bench=. -benchmem -count=10
- name: Compare with baseline
run: |
go install golang.org/x/perf/cmd/benchstat@latest
benchstat benchmarks/baseline.txt new.txt