Skip to content

feat(insights): parallel-subagent benefit (concurrency + time saved)#8

Merged
wan-huiyan merged 1 commit into
mainfrom
feat/subagent-parallelism-insight
May 29, 2026
Merged

feat(insights): parallel-subagent benefit (concurrency + time saved)#8
wan-huiyan merged 1 commit into
mainfrom
feat/subagent-parallelism-insight

Conversation

@wan-huiyan
Copy link
Copy Markdown
Owner

What

Follow-up to the wall-clock-union fix. The union gives correct elapsed time, but the sum of subagent durations still carries signal — so this surfaces the benefit of fanning out:

⚡ Parallel subagents: 5 ran in 38m wall (53m of work · 1.4× concurrent · saved 15m vs sequential)

  • sum − union = time saved by concurrency; sum / union = effective concurrency factor.
  • Shown only when ≥2 subagents actually overlapped (saved >1s) → sequential sessions get no spurious line (verified live: our 1-subagent session shows nothing).
  • Additive Insights line; does not change the corrected time bars. Exports unionMs from analyzer for reuse.

Tests

+3 formatter tests (overlap → line; single agent → none; sequential → none). 102 pass; tsc clean.

Note

Builds on the union fix (uses unionMs). Upstream version waits until the union PR (dioptx#7) merges, then goes up on a dedicated upstream/* branch.

🤖 Generated with Claude Code

Surfaces the value of fanning out: the subagent phase is aggregated by
wall-clock union (correct elapsed time), but sum−union = time saved by running
agents concurrently and sum/union = effective concurrency. Adds an Insights
line shown only when ≥2 subagents actually overlapped (saved >1s), so
sequential sessions get no spurious line. Exports unionMs from analyzer for
reuse. +3 formatter tests. 102 pass; tsc clean.
@wan-huiyan wan-huiyan merged commit db1e046 into main May 29, 2026
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