Establish performance baselines and regression detection - #3441
Establish performance baselines and regression detection#3441dheerajodha wants to merge 18 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
🤖 Finished Review · ✅ Success · Started 1:06 PM UTC · Completed 1:25 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
ReviewFindingsMedium
Low
Previous runReviewFindingsHigh
Medium
Low
Next steps:
Previous run (2)ReviewFindingsHigh
Medium
Low
Labels: PR adds a GitHub Actions workflow with command injection vulnerabilities in shell/Python interpolation Next steps:
Previous run (3)ReviewFindingsHigh
Medium
Low
Labels: PR adds CI benchmark workflow and benchmark infrastructure Next steps:
Previous run (4)ReviewFindingsMedium
Low
|
Add a report-only GitHub Actions workflow that runs the stress benchmark on PRs to main, surfacing peak memory and execution time in the job summary without blocking merges. Uses oras to pull pre-built benchmark data from Quay with upstream regeneration as fallback. Ref: EC-1818 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Initial CI run with 10/5 completed in under a minute. Increase to 40/10 to target 5-6 minute total job time on CI runners. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename workflow to "Stress Benchmark", add workflow_dispatch trigger, separate build from execution to surface compilation errors, and document CI-specific env var overrides. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Doubles component count from 40 to 80 to increase peak RSS (~4 GB), making memory regressions more visible in CI job summaries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Redirect stderr to a file instead of /dev/null so panics and errors are surfaced in the job summary. Rename job ID from Stress to stress to match the dominant lowercase convention in the repo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All components use the same image digest, so internal caches deduplicate after the first — higher counts don't add memory pressure. Use the code default to avoid misleading numbers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add job name for GitHub Actions UI display - Add cache restore step matching repo convention - Use awk -v for variable passing instead of shell interpolation - Add set -o pipefail so benchmark failures are not masked by tee Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a 15-minute timeout to prevent hung oras pulls or stuck benchmark processes from running for the default 6-hour limit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ec CLI emits harmless logrus ERRO messages during normal validation, which made every job summary start with a misleading Stderr section. Gate it on step outcome so it only appears when the benchmark actually fails. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The CLI now rejects past effective times by default. The benchmark uses a pinned date for reproducibility, so opt into the override. Resolves: EC-1818 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align pinned action versions with the rest of the repository: - harden-runner v2.15.1 → v2.20.1 - checkout v6.0.2 → v6.1.0 - cache/restore v5.0.4 → v5.1.0 - setup-go v6.3.0 → v6.5.0 Resolves: EC-1818 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add baseline.json with current benchmark metrics, thresholds.json with configurable regression limits (15% RSS, 20% time), and compare.sh to detect regressions. The CI workflow now compares results against the baseline and fails when thresholds are exceeded. Job summary shows current vs baseline with % change. A new `make benchmark_baseline` target regenerates the baseline from a local benchmark run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Restore continue-on-error on the job so benchmarks inform but don't block merges - Add continue-on-error on the compare step so regressions are reported in the summary without failing the job - Replace stderr suppression (2>/dev/null) with capture to file in the Makefile baseline target - Fix default workers fallback from 35 to 10 in the Makefile - Update baseline with latest CI run measurements Resolves: EC-1819 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 7:59 AM UTC · Completed 8:17 AM UTC Commit: |
- Replace grep -oP with python3 for macOS compatibility - Add validation for empty parsed metrics in compare.sh and Makefile - Remove continue-on-error from job and compare step so regressions fail the check; keep it on the bench run step for crash resilience - Rename execution_time_ns to ns_per_op for accuracy - Rename make target from benchmark_baseline to generate_baseline - Document baseline workflow in benchmark/README.md Resolves: EC-1819 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 12:10 PM UTC · Completed 12:28 PM UTC Commit: |
Pass benchmark output to Python via environment variables instead of interpolating into triple-quoted strings, preventing command injection if the benchmark binary emits crafted output. Skip baseline comparison when the benchmark step crashes to avoid conflating infrastructure failures with regressions. Guard against division by zero in baseline comparison. Rename generate_baseline to generate-baseline to match the Makefile's hyphenated naming convention. EC-1819 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 12:54 PM UTC · Completed 1:09 PM UTC Commit: |
Update AGENTS.md and the benchmark skill with stress benchmark make targets, baseline comparison workflow, and baseline regeneration. EC-1819 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 1:24 PM UTC · Completed 1:42 PM UTC Commit: |
Superseded by updated review
What:
Store benchmark baselines in the repo and compare CI results against them. Fail the benchmark check when regressions exceed configurable thresholds.
Why:
EC-1818 added a report-only stress benchmark to CI. This follow-up closes the loop by detecting regressions automatically, without baselines and thresholds, the benchmark runs but nobody notices when performance degrades.
Tickets:
EC-1819