Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

# Cargo.lock is intentionally tracked (workspace builds binaries).

# Regenerated by tools/dag-viewer/generate-sample.sh; dag.example.json is the committed sample
/tools/dag-viewer/dag.json

# Python bytecode cache (tools/clickhouse/extract_functions.py)
__pycache__/
*.pyc
Expand Down
14 changes: 4 additions & 10 deletions crates/devtools/tests/stage_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,9 @@ fn pass1_failure_still_writes_stage0_and_the_error() {
assert!(document["stage3_plan_selection"]["selected"].is_null());
}

/// The scalar-queries viewer fixture: standalone scalar queries first, in
/// the middle and last, which the physical DAG keeps in `scalar_roots`.
const SCALAR_QUERIES: &str = "../../tools/dag-viewer/examples/scalar-queries.json";
/// Standalone scalar queries first, in the middle and last, which the
/// physical DAG keeps in `scalar_roots` by query position (the viewer's
/// test_viewer.py draws this workload).
const SCALAR_QUERIES_ARGS: &[&str] = &[
"--promql",
"scalar(sum(m))",
Expand All @@ -463,14 +463,8 @@ const SCALAR_QUERIES_ARGS: &[&str] = &[
];

#[test]
fn scalar_queries_fixture_is_current() {
fn scalar_queries_keep_their_positions_in_scalar_roots() {
let document = document_of(SCALAR_QUERIES_ARGS);
let committed: Value = serde_json::from_str(
&std::fs::read_to_string(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(SCALAR_QUERIES))
.unwrap(),
)
.unwrap();
assert_eq!(document, committed, "regenerate the committed fixture");
let selected = document["stage3_plan_selection"]["selected"]
.as_str()
.unwrap();
Expand Down
1 change: 1 addition & 0 deletions tools/dag-viewer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
out/
310 changes: 120 additions & 190 deletions tools/dag-viewer/README.md

Large diffs are not rendered by default.

294 changes: 294 additions & 0 deletions tools/dag-viewer/app.js

Large diffs are not rendered by default.

Binary file removed tools/dag-viewer/cost-benefit-annotations.png
Binary file not shown.
Binary file removed tools/dag-viewer/cost-benefit-positive-savings.png
Binary file not shown.
Loading
Loading