feat(q1-27): orchestrator overhead bench (stub-mode, 5 shapes)#97
Merged
Conversation
Adds scripts/bench-orchestrate.ts — measures pure scheduler cost per node, parallel-vs-sequential speedup, no real LLM. Five synthetic shapes: chain-3, chain-10, wide-3, wide-10, diamond. Reports median + p95 wallclock + derived per-node-ms. Per-node overhead is bounded ~5-30ms (Bun.spawn + IPC + scheduler) and wide-3 collapses to ~3x speedup vs chain-3 under the Pro 3-agent cap. Real-LLM overhead dominates this floor (any API call >100ms) — the bench is stub-only by contract so it stays free, fast, and deterministic. Includes __tests__/bench-orchestrate.smoke.test.ts as a regression guard (per_node_ms_median < 100ms; wide-3 speedup in [1.5, 4]) and a docs/operations.md "Performance characteristics" section. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/bench-orchestrate.ts— pure scheduler cost benchmark for the Q1'27 orchestrator. RunsrunTaskGraphagainst 5 synthetic shapes (chain-3, chain-10, wide-3, wide-10, diamond) in stub mode. Reports median + p95 wallclock + derived per-node-ms and a parallel-vs-sequential speedup ratio.__tests__/bench-orchestrate.smoke.test.ts— regression guard. Spawns the bench with--iterations 3 --json, asserts exit 0, all 5 shape names present,per_node_ms_median < 100mseverywhere, andwide-3speedup in[1.5, 4].docs/operations.md— new section 9 "Performance characteristics" with re-run command + interpretation.No new external deps. Bench refuses to run with
ASHLR_ORCHESTRATE_REAL_LLM=1set, so it stays free, fast, deterministic.Example output (bun scripts/bench-orchestrate.ts --iterations 10)
```
Orchestrator overhead bench (stub mode, 10 iterations each)
shape nodes wallclock_median wallclock_p95 per_node_ms_median notes
chain-3 3 26ms 30ms 8.8
chain-10 10 90ms 98ms 9.0
wide-3 3 9ms 10ms 3.1 parallel: 2.8x speedup vs chain-3
wide-10 10 20ms 21ms 2.0 tier-cap-bounded
diamond 4 25ms 27ms 6.3
orchestrator overhead per node: ~5-30ms (stub spawn + scheduler)
parallel speedup matches theoretical N/maxConcurrency for wide DAGs
```
Stub-mode overhead is bounded ~5-30ms per node; real-LLM mode is dominated by the LLM call (>100ms each) so this floor only matters as a regression guard.
Test plan
Closes task #42.
Generated with Claude Code