add replay command: reconstruct the observed schedule#2
Merged
Conversation
`analyze` predicts a theoretical lower bound on wall-clock from the DAG's critical path. `replay` does the complementary thing: reads the observed schedule out of run_results.json (thread_id + per-phase timing) and joins against manifest.json's parent_map to report: - per-thread utilization (busy vs. idle, events executed) - observed critical path, walked backwards from the last-completing node by picking, at each step, the parent whose completion time was closest to this node's start - top idle gaps, each attributed to the parent node the thread was waiting on (or flagged as scheduler overhead if all parents were already done) CLI: `dbt-dag-opt replay --manifest ... --run-results ...` with `text` (default) and `json` formats. Same file/cloud input modes as `analyze`. Tests: synthetic 4-node 2-thread fixture with known expected chain + integration fixture at tests/fixtures/dbt_dugout/ (real 57-node Snowflake run) smoke-tested through CLI. Suite: 42 passed (+13 replay tests). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
analyzepredicts a theoretical lower bound on wall-clock from the DAG's critical path.replaydoes the complementary thing: reads the observed schedule out of run_results.json (thread_id + per-phase timing) and joins against manifest.json's parent_map to report:CLI:
dbt-dag-opt replay --manifest ... --run-results ...withtext(default) andjsonformats. Same file/cloud input modes asanalyze.Tests: synthetic 4-node 2-thread fixture with known expected chain + integration fixture at tests/fixtures/dbt_dugout/ (real 57-node Snowflake run) smoke-tested through CLI. Suite: 42 passed (+13 replay tests).