name: Benchmarks
on:
workflow_dispatch:
inputs:
samples:
description: Fresh projects to measure for DX p50/p95
required: false
default: "5"
schedule:
- cron: "17 4 * * 1"
permissions:
contents: read
jobs:
hot-paths:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 with:
persist-credentials: false
- name: Setup Rust
uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 with:
toolchain: stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae
- name: Run hot-path benchmarks
run: cargo bench --bench hot_paths --features auth,jobs,websocket -- --noplot
dx-golden-path:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 with:
persist-credentials: false
- name: Setup Rust
uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 with:
toolchain: stable
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae
- name: Build Tideway CLI
run: cargo build --release --locked -p tideway-cli
- name: Validate DX benchmark harness
run: python3 scripts/benchmark_dx.py --self-test
- name: Measure canonical developer journeys
env:
SAMPLES: ${{ inputs.samples || '5' }}
run: >-
python3 scripts/benchmark_dx.py
--samples "$SAMPLES"
--cli target/release/tideway
--framework-source .
--output target/dx-benchmarks/results.json
- name: Upload DX benchmark results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 with:
name: tideway-dx-benchmark
path: target/dx-benchmarks/results.json
if-no-files-found: error