Skip to content

Benchmarks

Benchmarks #1

Workflow file for this run

name: Benchmarks
on:
workflow_dispatch:
inputs:
timeout:
description: Per-experiment timeout (e.g., 2m, 5m)
required: false
default: 5m
namespace:
description: Fleet workspace namespace
required: false
default: fleet-local
permissions:
contents: read
concurrency:
group: benchmarks-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark:
name: Run Fleet Benchmarks
runs-on: ubuntu-22.04
timeout-minutes: 90
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24.x'
cache: true
- name: Install host dependencies
run: |
sudo apt-get update
sudo apt-get install -y jq
- name: Setup kubectl
uses: azure/setup-kubectl@v4
with:
version: 'latest'
- name: Setup Helm
uses: azure/setup-helm@v4
with:
version: 'latest'
- name: Install k3d
uses: AbsaOSS/k3d-action@v2
with:
version: v5.6.3
- name: Create k3d cluster
run: |
# Use default settings; no custom Docker network required
k3d_args="" ./dev/setup-k3d upstream
- name: Build Fleet images
run: |
./dev/build-fleet
- name: Import images to k3d
env:
FLEET_E2E_CLUSTER: k3d-upstream
run: |
./dev/import-images-k3d
- name: Install Fleet to cluster
run: |
./dev/setup-fleet upstream
- name: Label local cluster for benchmarks
run: |
kubectl -n ${{ inputs.namespace }} label clusters.fleet.cattle.io local fleet.cattle.io/benchmark=true --overwrite
- name: Run Benchmarks
env:
FLEET_BENCH_TIMEOUT: ${{ inputs.timeout }}
FLEET_BENCH_NAMESPACE: ${{ inputs.namespace }}
run: |
go run ./benchmarks/cmd run -d benchmarks/db -t "$FLEET_BENCH_TIMEOUT" -n "$FLEET_BENCH_NAMESPACE"
- name: Collect benchmark report filename
id: report
shell: bash
run: |
set -euo pipefail
file=$(ls -1t b-*.json | head -n1)
echo "report=$file" >> "$GITHUB_OUTPUT"
echo "Found report: $file"
- name: Upload benchmark JSON
uses: actions/upload-artifact@v4
with:
name: benchmark-report
path: ${{ steps.report.outputs.report }}