Skip to content

feat(bench): add parallel execution benchmark#29

Merged
chaliy merged 5 commits intomainfrom
claude/parallel-execution-benchmark-9rOPG
Feb 1, 2026
Merged

feat(bench): add parallel execution benchmark#29
chaliy merged 5 commits intomainfrom
claude/parallel-execution-benchmark-9rOPG

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 1, 2026

Summary

  • Add criterion benchmark for parallel bash session execution
  • Test sequential vs parallel with realistic workloads (grep/awk/sed)
  • Document threading model and benchmark requirements in specs

Changes

  • crates/bashkit/benches/parallel_execution.rs - benchmark with light/medium/heavy workloads
  • specs/007-parallel-execution.md - threading model and Arc usage docs
  • AGENTS.md - pre-PR checklist item for perf benchmarks

Results

Workload Sequential Parallel Speedup
Light 575µs 244µs 2.4x
Medium 2.9ms 671µs 4.3x
Heavy 8.5ms 1.2ms 7x

Test plan

  • cargo bench --bench parallel_execution -- --test passes
  • Verification tests confirm scripts compute correct results
  • cargo clippy and cargo fmt clean

Adds criterion benchmark to test parallel Bash instance execution:
- Compares sequential vs parallel execution (10-500 sessions)
- Tests shared filesystem via Arc<dyn FileSystem>
- Verifies threading model works as expected

Results show ~2.5x speedup at 100 parallel sessions.

https://claude.ai/code/session_01HkyPLLh8UTGfedhEbYKbLM
Adds test that verifies the benchmark script actually computes
1+2+3+4+5=15, proving the interpreter executes real work.

https://claude.ai/code/session_01HkyPLLh8UTGfedhEbYKbLM
Replaces simple loop with real workloads:
- Light: arithmetic loop (1+2+3+4+5)
- Medium: log generation + grep + awk analysis
- Heavy: 100 lines + grep + awk + sed transforms

Results show 2-7x speedup for parallel execution.

https://claude.ai/code/session_01HkyPLLh8UTGfedhEbYKbLM
Changes touching Arc, RwLock, Interpreter, FileSystem, async paths,
or builtins must run benchmark and verify no regression.

https://claude.ai/code/session_01HkyPLLh8UTGfedhEbYKbLM
- Created specs/007-parallel-execution.md with threading model, Arc usage, benchmark details
- Condensed AGENTS.md to single Pre-PR checklist item referencing spec

https://claude.ai/code/session_01HkyPLLh8UTGfedhEbYKbLM
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chaliy chaliy merged commit 278251c into main Feb 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants