Skip to content

Commit 9de11f0

Browse files
noahgiftclaude
andcommitted
release: v6.25.0 - Scientific Benchmarking Command
Add bashrs bench command for deterministic, scientifically rigorous shell script benchmarking. NEW FEATURES: - Scientific benchmarking with warmup + measured iterations - Statistical analysis (mean, median, stddev, min, max, variance) - Environment capture (CPU, RAM, OS, hostname) - Quality gates integration (--strict linting, --verify-determinism) - Multiple output formats (console, JSON) - Comparison mode for multiple scripts - Quiet mode for automation IMPLEMENTATION: - EXTREME TDD methodology (RED → GREEN → REFACTOR) - 17 comprehensive CLI integration tests - 8 unit tests for statistical functions - NASA-quality specification (docs/specifications/bench-command.md) - 550+ lines of implementation (rash/src/cli/bench.rs) QUALITY METRICS: - All 17 bench tests passing - All 6000+ existing tests passing (zero regressions) - 642 property tests passing (project-wide) - Clippy clean, rustfmt formatted - Real-world examples tested DEPENDENCIES: - Added sysinfo = "0.31" for system information detection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 2e55e2d commit 9de11f0

File tree

9 files changed

+1483
-1
lines changed

9 files changed

+1483
-1
lines changed

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,67 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [6.25.0] - 2025-11-01
11+
12+
### ✨ NEW FEATURE - Scientific Benchmarking (EXTREME TDD)
13+
14+
**bashrs v6.25.0 adds `bashrs bench` command for deterministic, scientifically rigorous shell script benchmarking.**
15+
16+
### Added
17+
18+
**`bashrs bench` Command** (17 comprehensive tests, 550+ lines, NASA-quality specification):
19+
20+
- **Scientific benchmarking**: Warmup iterations + measured runs with statistical analysis
21+
- **Statistical metrics**: Mean, median, standard deviation, min, max, variance
22+
- **Environment capture**: CPU, RAM, OS, hostname metadata using sysinfo crate
23+
- **Quality gates integration**:
24+
- `--strict`: Run bashrs linter on scripts before benchmarking
25+
- `--verify-determinism`: Verify scripts produce identical output across runs
26+
- **Output formats**:
27+
- Console: Beautiful formatted output with emojis and box-drawing characters
28+
- JSON: Machine-readable results with full metadata (`--output results.json`)
29+
- **Comparison mode**: Benchmark multiple scripts, calculate speedup ratios, identify winner
30+
- **Quiet mode**: Suppress console output, only produce JSON (`--quiet`)
31+
- **Raw results**: Display all iteration times (`--show-raw`)
32+
33+
**CLI Usage**:
34+
```bash
35+
# Basic benchmark
36+
bashrs bench script.sh
37+
38+
# Custom iterations and warmup
39+
bashrs bench script.sh --iterations 20 --warmup 5
40+
41+
# Compare multiple scripts
42+
bashrs bench fast.sh slow.sh
43+
44+
# With quality gates
45+
bashrs bench script.sh --strict --verify-determinism
46+
47+
# JSON output for automation
48+
bashrs bench script.sh --output results.json --quiet
49+
```
50+
51+
**Specification**: Full NASA-quality spec at `docs/specifications/bench-command.md`
52+
53+
**Implementation Methodology**:
54+
- EXTREME TDD: RED (17 failing tests) → GREEN (all passing) → REFACTOR (quality gates)
55+
- Property-based testing ready (infrastructure in place)
56+
- Test coverage: 17 CLI integration tests + 8 unit tests
57+
- Zero regressions: All 6000+ existing tests still passing
58+
59+
**Quality Metrics**:
60+
- ✅ All 17 CLI tests passing
61+
- ✅ All 6000+ existing tests passing (no regressions)
62+
- ✅ Clippy clean
63+
- ✅ Formatted with rustfmt
64+
- ✅ Real-world examples tested
65+
- ✅ 642 property tests passing (project-wide)
66+
67+
### Dependencies
68+
69+
- Added `sysinfo = "0.31"` for CPU/RAM/OS detection
70+
1071
## [6.24.3] - 2025-11-01
1172

1273
### ⚡ PERFORMANCE - Code Complexity Reduction (EXTREME TDD)

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rstest = "0.25"
2929
rustyline = "17.0"
3030

3131
[workspace.package]
32-
version = "6.24.3"
32+
version = "6.25.0"
3333
edition = "2021"
3434
authors = ["Pragmatic AI Labs"]
3535
license = "MIT"

0 commit comments

Comments
 (0)