Skip to content

feat(q1-27): orchestrator overhead bench (stub-mode, 5 shapes)#97

Merged
masonwyatt23 merged 1 commit into
mainfrom
feat/q1-27-orchestrate-bench
May 23, 2026
Merged

feat(q1-27): orchestrator overhead bench (stub-mode, 5 shapes)#97
masonwyatt23 merged 1 commit into
mainfrom
feat/q1-27-orchestrate-bench

Conversation

@masonwyatt23
Copy link
Copy Markdown
Member

Summary

  • New scripts/bench-orchestrate.ts — pure scheduler cost benchmark for the Q1'27 orchestrator. Runs runTaskGraph against 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 < 100ms everywhere, and wide-3 speedup 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=1 set, 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

  • bun scripts/bench-orchestrate.ts --iterations 10 produces the table above
  • bun scripts/bench-orchestrate.ts --iterations 3 --json emits valid JSON
  • bun test tests/bench-orchestrate.smoke.test.ts — 1 pass / 25 expects
  • bunx tsc --noEmit clean for new files
  • bun run mdx-lint ok (71 files)

Closes task #42.

Generated with Claude Code

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ashlr-plugin-site Building Building Preview, Comment May 23, 2026 6:08am

Request Review

@masonwyatt23 masonwyatt23 merged commit 36af160 into main May 23, 2026
8 of 14 checks passed
@masonwyatt23 masonwyatt23 deleted the feat/q1-27-orchestrate-bench branch May 23, 2026 06:09
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.

1 participant