Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
85b6a60
feat(bench): add comprehensive throughput analysis tool
claude Nov 5, 2025
079fda8
docs: add implementation summary for bench_throughput
claude Nov 5, 2025
ce475f4
fix(bench): resolve borrow-after-move error in bench_throughput
claude Nov 5, 2025
a7a5733
chore: add bench_results.json to .gitignore
claude Nov 5, 2025
3cde155
fix(bench): correct template syntax for all benchmarks
claude Nov 5, 2025
ef5993d
fix(bench): correct template syntax - remove spaces after pipes
claude Nov 5, 2025
d82da9b
refactor(bench): make latency statistics more compact
claude Nov 5, 2025
5bb80b5
refactor(bench): remove excess whitespace in benchmark progress output
claude Nov 5, 2025
d6469e2
feat(bench): show human-readable output even when outputting JSON
claude Nov 5, 2025
e69b45a
feat(bench): restore newline spacing and add --quiet flag
claude Nov 5, 2025
000e2f5
fix(bench): remove artificial operation breakdown calculations
claude Nov 5, 2025
867e973
feat(bench): migrate to crossterm with colors, progress bars, and com…
claude Nov 5, 2025
53ef5f0
feat(bench): minor styling changes
lalvarezt Nov 5, 2025
59b5561
fix(bench): correct header box alignment with unicode-aware width cal…
claude Nov 5, 2025
7117001
refactor(bench): reduce header and separator width from 110 to 80 chars
claude Nov 5, 2025
a9b871f
fix(bench): correct percentile calculation using nearest-rank method
claude Nov 5, 2025
50f21ca
refactor(bench): parse N times, remove detailed flag, always collect …
claude Nov 5, 2025
db37106
refactor(bench): remove completion messages in normal mode for cleane…
claude Nov 5, 2025
e6e64f3
feat(bench): add performance consistency analysis to latency statistics
claude Nov 5, 2025
1400822
refactor(bench): remove max value and outliers analysis from latency …
claude Nov 5, 2025
abf8cda
feat(bench): implement iteration-level timing and add statistical for…
claude Nov 5, 2025
8ab28d2
refactor(bench): change default behavior to show summary only, add --…
claude Nov 5, 2025
ea6ce98
fix(bench): show statistics note only in verbose mode, restore progre…
claude Nov 5, 2025
90b655a
feat(bench): add p95, p99, and stddev to summary table, show input si…
claude Nov 5, 2025
901a407
feat(ci): add automated benchmark tracking with performance regressio…
claude Nov 5, 2025
22b32dc
chore(bench): cleanup artifacts
lalvarezt Nov 5, 2025
0a8c4e9
fix(ci): compare to p95 instead of p99, it's more stable
lalvarezt Nov 5, 2025
1e3fac5
refactor(ci): remove redundant human-readable benchmark output
claude Nov 5, 2025
b6b41e0
chore: add benchmark result files to .gitignore
claude Nov 5, 2025
4f6121e
chore(bench): fix formatting
lalvarezt Nov 5, 2025
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
99 changes: 92 additions & 7 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,104 @@
name: Performance Benchmarks
on: [push, pull_request]

on:
push:
branches:
- main
pull_request:

jobs:
benchmark:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Build benchmark tool
run: cargo build --release --bin string-pipeline-bench
run: cargo build --release --bin bench_throughput

- name: Run benchmarks
run: |
./target/release/string-pipeline-bench --iterations 5000 > benchmark_results.txt
- name: Upload results
# Run benchmarks with multiple sizes and save to JSON
./target/release/bench_throughput \
--sizes 100,1000,10000 \
--iterations 50 \
--format json \
--output benchmark_results.json

- name: Download baseline benchmark
id: download-baseline
continue-on-error: true
uses: dawidd6/action-download-artifact@v3
with:
workflow: benchmark.yml
branch: main
name: benchmark-baseline
path: baseline
if_no_artifact_found: warn

- name: Compare with baseline
id: compare
run: |
if [ -f baseline/benchmark_results.json ]; then
echo "Baseline found, comparing results..."
python3 scripts/compare_benchmarks.py \
baseline/benchmark_results.json \
benchmark_results.json > comparison.md
echo "comparison_available=true" >> $GITHUB_OUTPUT
else
echo "No baseline found, this will become the new baseline"
echo "comparison_available=false" >> $GITHUB_OUTPUT
echo "## Benchmark Results\n\nNo baseline available for comparison. These results will be used as the baseline for future comparisons." > comparison.md
fi

- name: Comment PR with results
if: github.event_name == 'pull_request' && steps.compare.outputs.comparison_available == 'true'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const comparison = fs.readFileSync('comparison.md', 'utf8');

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comparison
});

- name: Upload current results as artifact
uses: actions/upload-artifact@v4
with:
name: benchmark-results
name: benchmark-current
path: |
benchmark_results.json
comparison.md

- name: Upload as baseline (main branch only)
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: benchmark-baseline
path: benchmark_results.json
retention-days: 90

- name: Fail if significant performance regression
if: steps.compare.outputs.comparison_available == 'true'
run: |
if grep -q "⚠️ PERFORMANCE REGRESSION" comparison.md; then
echo "::warning::Performance regression detected. Review comparison.md for details."
# Uncomment the next line to fail the build on regression
# exit 1
fi
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
/target

# Benchmark results
bench_results.json
benchmark_results.json
benchmark_results.txt
comparison.md
Loading
Loading