feat(control-plane): inspect compiled physical plans - #736
milindsrivastava1997 wants to merge 5 commits into
Conversation
Example: inspect one priced workloadThis diagram was generated from the checked-in planning snapshot with the query: {
"query": "quantile_over_time(0.99, m[1m])",
"demand": {"fixed_interval_at": {"interval": 10000, "evaluation_phase": 0}},
"requirements": {"accuracy": {"explicit": {"EpsilonDelta": {"epsilon": 0.01, "delta": 0.01}}}}
}The full base input is compile_workload_artifact SNAPSHOT.json --dot selected.dot > selected.json
dot -Tsvg selected.dot -o selected.svgThe selected materialization is a sliding 60-second window advanced every 10 seconds and stored as 10-second panes. The dashed |
|
@zzylol Few questions in this
|
|
For a more descriptive display, I suggest:
This makes the semantic-to-physical mapping visible without implying that the estimate runs during precomputation. A smaller first step would be to rename the current inner DAG box BTW, it requires some code reviewing, but https://github.com/ProjectASAP/ASAPPlanner/blob/029ff2fe041172c94c2d32c90b185bc83c5e8a57/crates/types/src/post_asap/executable_dag.rs#L446 as here, where the nodes are defined and visualized, the node definitions themselves might just be not that clear. |
|
@zzylol some more questions:
|
|
|
@zzylol I also think we need to reword "maintenance". I see atleast 3 concepts
Are there other concepts/terms? Questions:
|
|
Filed #740 |
|
@zzylol can we merge this? |
Goal
When evaluating a deployment candidate, an engineer should be able to answer two practical questions without reading Rust debug output:
This PR makes
compile_workload_artifacta practical inspection tool for those answers.What changes
The command now prints the complete
CompiledPhysicalPlanas JSON instead of a hand-built subset. With--dot PLAN.dot, it also produces a diagram showing:PrecomputePlanDAG that creates and maintains summaries;QueryPlanDAG that serves each query;Before this PR
The command emitted a custom JSON wrapper, and seeing the relationship between a query and its maintained state required manually correlating several nested JSON documents. There was no visual plan view.
After this PR
compile_workload_artifact SNAPSHOT.json --dot selected.dot > selected.json dot -Tsvg selected.dot -o selected.svgselected.jsonis the full selected physical plan.selected.svggives a compact map of the maintenance and serving paths for that same candidate.Verification
Scope
The diagram is a developer-inspection aid, not a new deployment API or versioned wire format.