Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3d10439
docs: add benchmark suite design
gmemuriuki Aug 28, 2026
69942b2
build: scaffold the benchmark suite
gmemuriuki Aug 29, 2026
2631a7b
test: add deterministic benchmark fixtures
gmemuriuki Aug 29, 2026
27b4d28
bench: add fixture discovery support
gmemuriuki Aug 29, 2026
8fc4ff1
bench: add fixture copying support
gmemuriuki Aug 29, 2026
7e6515e
bench: add isolated benchmark sandboxes
gmemuriuki Aug 29, 2026
a1c82d0
test: add workspace cache fixture
gmemuriuki Aug 29, 2026
6bcdc16
test: verify workspace cache memoization
gmemuriuki Aug 29, 2026
2174be1
test: strengthen workspace cache coverage
gmemuriuki Aug 29, 2026
cfc7240
bench: add workspace cache clearing
gmemuriuki Aug 29, 2026
8c8b272
bench: add symposium dependency to benchsuite
gmemuriuki Aug 29, 2026
dea9684
bench: add typed fixture validation
gmemuriuki Aug 29, 2026
abe7307
refactor: extract benchmark sandbox support
gmemuriuki Aug 29, 2026
85dc995
refactor: split benchmark support into modules
gmemuriuki Aug 29, 2026
07a4f1a
docs: describe benchmark support architecture
gmemuriuki Aug 29, 2026
5f35ad3
bench: configure workspace dependency benchmarks
gmemuriuki Aug 31, 2026
f8eb0b8
bench: measure workspace cache misses
gmemuriuki Aug 31, 2026
090ba7a
docs: document workspace dependency benchmark
gmemuriuki Aug 31, 2026
d5961b9
bench: measure workspace disk cache hits
gmemuriuki Aug 31, 2026
ecc9d9a
bench: set up hook dispatch target
gmemuriuki Aug 31, 2026
3c2a18a
bench: add sandbox configuration setup
gmemuriuki Aug 31, 2026
d474ec8
bench: trim redundant comments from fixture and sandbox
gmemuriuki Aug 31, 2026
1df9104
bench: record metadata attempts in the Cargo guard
gmemuriuki Aug 31, 2026
5c7db6f
bench: prepare minimal hook dispatch workload
gmemuriuki Sep 1, 2026
189474c
bench: measure minimal hook dispatch latency
gmemuriuki Sep 1, 2026
1748742
bench: make workspace sampling modes explicit
gmemuriuki Sep 1, 2026
a8e4583
bench: add minimal hook configuration fixture
gmemuriuki Sep 1, 2026
f1929a4
bench: add local registry configuration fixture
gmemuriuki Sep 1, 2026
21181b3
bench: validate the local registry command fixture
gmemuriuki Sep 1, 2026
cf26b13
docs: describe hook benchmark fixture configuration
gmemuriuki Sep 1, 2026
7aca8fc
bench: measure local registry hook dispatch
gmemuriuki Sep 1, 2026
3f0b2ad
docs: clarify hook benchmark resolution
gmemuriuki Sep 1, 2026
19fd124
docs: list the local registry hook benchmark
gmemuriuki Sep 1, 2026
3a410b2
docs: consolidate hook benchmark contracts
gmemuriuki Sep 1, 2026
a1cb902
ci: compile benchmarks on native runners
gmemuriuki Sep 1, 2026
a032df9
ci: add benchmark measurement workflow
gmemuriuki Sep 1, 2026
94f5bd8
docs: update benchmark automation design
gmemuriuki Sep 1, 2026
ed6e30c
ci: update CI actions for Node 24
gmemuriuki Sep 1, 2026
fd396fb
ci: update Pages actions for Node 24
gmemuriuki Sep 1, 2026
4d7df5e
ci: update release actions for Node 24
gmemuriuki Sep 1, 2026
2e45ff3
ci: update release checkout action
gmemuriuki Sep 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Benchmarks

on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- .cargo/**
- .github/workflows/benchmarks.yml
- benches/**
- Cargo.toml
- Cargo.lock
- src/**
- symposium-install/**
- symposium-sdk/**

permissions:
contents: read

env:
CARGO_TERM_COLOR: always

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
measure:
name: Measure benchmarks
runs-on: ubuntu-24.04
timeout-minutes: 45

steps:
- uses: actions/checkout@v7

- name: Install Rust 1.98.0
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.98.0

- name: Cache Cargo dependencies
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: benchmark-rust-1.98.0-${{ hashFiles('Cargo.lock') }}

- name: Record benchmark environment
shell: bash
run: |
{
printf 'Commit: %s\n\n' "$GITHUB_SHA"
printf 'Runner image: %s (%s)\n\n' \
"${ImageOS:-unknown}" "${ImageVersion:-unknown}"
rustc --version --verbose
printf '\n'
cargo --version --verbose
printf '\n'
uname -a
printf '\n'
lscpu
} | tee benchmark-environment.txt

- name: Smoke-test benchmark workloads
run: cargo test -p symposium-benchsuite --benches --locked

- name: Measure workspace dependency resolution
run: cargo bench -p symposium-benchsuite --bench workspace_deps --locked

- name: Measure hook dispatch
run: cargo bench -p symposium-benchsuite --bench hook_dispatch --locked

- name: Write benchmark summary
shell: bash
run: |
set -euo pipefail

median_ns() {
jq -er '.median.point_estimate' \
"target/criterion/$1/new/estimates.json"
}

format_ms() {
awk -v nanoseconds="$1" \
'BEGIN { printf "%.2f ms", nanoseconds / 1000000 }'
}

cache_miss=$(median_ns \
workspace_deps/symposium_cache_miss)
cache_hit=$(median_ns \
workspace_deps/new_resolver_disk_cache_hit)
minimal_hook=$(median_ns \
hook_dispatch/pre_tool_use_minimal_config)
registry_hook=$(median_ns \
hook_dispatch/pre_tool_use_local_registry)
cache_speedup=$(awk \
-v miss="$cache_miss" \
-v hit="$cache_hit" \
'BEGIN { printf "%.2fx", miss / hit }')
os_name=$(. /etc/os-release && printf '%s' "$PRETTY_NAME")
cpu_name=$(lscpu | awk -F: \
'$1 == "Model name" { sub(/^[[:space:]]+/, "", $2); print $2 }')

{
echo '> These experimental measurements are informational.'
echo '> They do not gate merges or establish a regression.'
echo
echo '## Benchmark environment'
printf -- '- Commit: `%s`\n' "$GITHUB_SHA"
printf -- '- Rust: `%s`\n' "$(rustc --version)"
printf -- '- Cargo: `%s`\n' "$(cargo --version)"
printf -- '- Runner image: `%s` (`%s`)\n' \
"${ImageOS:-unknown}" "${ImageVersion:-unknown}"
printf -- '- OS: `%s`\n' "$os_name"
printf -- '- CPU: `%s` (%s available cores)\n\n' \
"$cpu_name" "$(nproc)"
echo '## Median estimates'
echo '| Benchmark | Median |'
echo '| --- | ---: |'
printf '| `workspace_deps/symposium_cache_miss` | %s |\n' \
"$(format_ms "$cache_miss")"
printf '| `workspace_deps/new_resolver_disk_cache_hit` | %s |\n' \
"$(format_ms "$cache_hit")"
printf '| `hook_dispatch/pre_tool_use_minimal_config` | %s |\n' \
"$(format_ms "$minimal_hook")"
printf '| `hook_dispatch/pre_tool_use_local_registry` | %s |\n\n' \
"$(format_ms "$registry_hook")"
printf '**Workspace cache speedup:** %s\n' "$cache_speedup"
} >> "$GITHUB_STEP_SUMMARY"

- name: Upload benchmark results
if: always()
uses: actions/upload-artifact@v7
with:
name: criterion-${{ github.sha }}-attempt-${{ github.run_attempt }}
path: |
benchmark-environment.txt
target/criterion/
if-no-files-found: warn
retention-days: 14
22 changes: 15 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
Expand All @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand All @@ -71,18 +71,22 @@ jobs:
include:
- name: ubuntu
os: ubuntu-latest
native: true
- name: macos
os: macos-latest
native: true
- name: musl
os: ubuntu-latest
target: x86_64-unknown-linux-musl
native: false
- name: windows
os: windows-latest
native: true

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand All @@ -96,7 +100,7 @@ jobs:
sudo apt-get install -y musl-tools

- name: Cache Rust dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
Expand Down Expand Up @@ -125,20 +129,24 @@ jobs:
- name: Test
run: cargo test ${{ matrix.target && format('--target {0}', matrix.target) || '' }}

- name: Check benchmarks
if: matrix.native
run: cargo check -p symposium-benchsuite --all-targets

xtask:
name: Run xtask checks
needs: check
timeout-minutes: 20
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Install mdbook and preprocessors
env:
Expand All @@ -31,7 +31,7 @@ jobs:
run: mdbook build

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
with:
path: book

Expand All @@ -44,4 +44,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
6 changes: 3 additions & 3 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
if: runner.os == 'Windows'
run: git config --system core.longpaths true

- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -65,14 +65,14 @@ jobs:

- name: Upload to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v3
with:
files: dist/cargo-agents-${{ matrix.target }}.*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: binary-${{ matrix.target }}
path: dist/cargo-agents*
2 changes: 1 addition & 1 deletion .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- &checkout
name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: true
Expand Down
Loading
Loading