Skip to content

Per-worker stats in meta, fix status for FLAME - #38

Merged
cigrainger merged 1 commit into
mainfrom
fix/flame-status-workers-only
Mar 25, 2026
Merged

cigrainger merged 1 commit into
mainfrom
fix/flame-status-workers-only

Conversation

@cigrainger

Copy link
Copy Markdown
Contributor

Summary

  • Per-worker execution stats: fan_out now captures %{node, duration_ms, ipc_bytes} per worker and attaches to meta.worker_stats
  • Remove broken status(pool) overload: :pg doesn't propagate across FLAME nodes, so the pool-name discovery path always returned 0 workers. Only status(workers) with the list from spin_up works.

Usage

result = pipeline |> Dux.distribute(workers) |> Dux.compute()
result.meta.worker_stats
# => [
#   %{node: :"flame-abc@...", duration_ms: 1200, ipc_bytes: 42_000_000},
#   %{node: :"flame-def@...", duration_ms: 1400, ipc_bytes: 44_000_000},
#   ...
# ]

Dux.Flame.status(workers)
# => %{total_workers: 3, nodes: %{...}, worker_pids: [...]}

Test plan

  • 42 tests pass (0 failures)
  • Credo strict clean
  • No performance cost — stats use O(1) operations on existing data

🤖 Generated with Claude Code

- fan_out captures per-worker stats (node, duration_ms, ipc_bytes)
- Coordinator attaches worker_stats list to meta
- Remove status(pool) overload — :pg doesn't work across FLAME nodes
- status/1 only accepts workers list

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cigrainger
cigrainger merged commit aa868c1 into main Mar 25, 2026
5 checks passed
@cigrainger
cigrainger deleted the fix/flame-status-workers-only branch March 25, 2026 06:47
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