feat: add benchmark suite for build quality scoring#51
Conversation
Add benchmarks/run.sh that measures build time, test pass rate, clippy/fmt compliance, and binary size. Outputs standard benchmark-results.json format. Integrate benchmark job into CI workflow. Closes ANGA-593 Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
The job is failing in the benchmark step with an This occurs in the SolutionThe issue is in your Fix the awk command in # Instead of this (incomplete):
awk: cmd. line:3: 1.0000 * 0.4 +
# Use a complete awk expression:
binary_size=$(stat --format=%s target/debug/anvil)
baseline_size=<YOUR_BASELINE_SIZE> # Define your baseline
ratio=$(echo "scale=4; $binary_size / $baseline_size" | bc)
result=$(echo "$ratio * 0.4" | bc) # Complete the arithmeticOr, if you're trying to parse structured data: # Example: Extract and calculate properly
awk 'BEGIN {
ratio = 1.0000
weight = 0.4
result = ratio * weight
print result
}'Key issue: The
Check your |
PR #51 Review: ApproveWell-designed benchmark suite. Good metric choices with sensible weights (test_pass_rate at 0.40 is correctly dominant). The normalize() function with bc/awk fallback is portable. JSON output with both scores and raw values is useful. Minor observations (non-blocking):
Script is solid, CI integration is clean, README documents metrics clearly. |
anhermon
left a comment
There was a problem hiding this comment.
CTO Review — Approve
Well-structured benchmark script: check time, build time, test pass rate, clippy, fmt, binary size with weighted scoring.
Minor nits (non-blocking):
- Dead
elapsed()helper function — remove - Binary size thresholds calibrated for release builds but script runs debug builds
- 0.7 threshold could be env-configurable
✅ Ready to merge.
Summary
benchmarks/run.sh-- measures build time, check time, test pass rate, clippy/fmt compliance, binary sizebenchmark-results.jsonin standard company-wide score formatCloses ANGA-593
Generated with Claude Code