Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cpu-cycles instead of execution-time to highlight operators with higher cpu consumption #129

Merged
merged 1 commit into from
Oct 31, 2024
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
2 changes: 1 addition & 1 deletion query-graphs/src/hyper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function convertHyperNode(rawNode: Json, parentKey, conversionState: ConversionS
}

// Information on the execution time
const execTime = tryGetPropertyPath(rawNode, ["analyze", "execution-time"]);
const execTime = tryGetPropertyPath(rawNode, ["analyze", "cpu-cycles"]);
if (typeof execTime === "number") {
conversionState.runtimes.push({node: convertedNode, time: execTime});
}
Expand Down
18 changes: 9 additions & 9 deletions standalone-app/examples/hyper/tpch-q11-error-analyze.plan.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"debugName": {"classification": "nonsensitive", "value": "nation"},
"restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "GERMANY"}}}],
"selectivity": 0.04,
"analyze": {"pipeline": 5, "execution-time": 4527, "running": false, "tuple-count": 1}
"analyze": {"pipeline": 5, "cpu-cycles": 4527, "running": false, "tuple-count": 1}
},
"right": {
"operator": "tablescan",
Expand All @@ -64,7 +64,7 @@
"debugName": {"classification": "nonsensitive", "value": "supplier"},
"earlyProbes": [{"builder": 7, "attributes": [3], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 4, "execution-time": 798, "running": false, "tuple-count": 19}
"analyze": {"pipeline": 4, "cpu-cycles": 798, "running": false, "tuple-count": 19}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v6"}, "right": {"expression": "iuref", "iu": "v3"}},
"analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 19}
Expand All @@ -80,7 +80,7 @@
"debugName": {"classification": "nonsensitive", "value": "partsupp"},
"earlyProbes": [{"builder": 6, "attributes": [1], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 3, "execution-time": 1158, "running": false, "tuple-count": 58}
"analyze": {"pipeline": 3, "cpu-cycles": 1158, "running": false, "tuple-count": 58}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v5"}},
"analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 21}
Expand All @@ -89,7 +89,7 @@
"emptyGroups": true,
"aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v8"}}}],
"aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v10", ["BigNumeric", 38, 2, "nullable"]]}],
"analyze": {"pipeline": 2, "execution-time": 17, "memory-bytes": 0, "running": false, "tuple-count": 1}
"analyze": {"pipeline": 2, "cpu-cycles": 17, "memory-bytes": 0, "running": false, "tuple-count": 1}
},
"values": [{"iu": ["v11", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "const", "value": {"type": ["Numeric", 5, 4], "value": 1}}}}],
"analyze": {"pipeline": 2, "tuple-count": 1}
Expand Down Expand Up @@ -122,7 +122,7 @@
"debugName": {"classification": "nonsensitive", "value": "nation"},
"restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "GERMANY"}}}],
"selectivity": 0.04,
"analyze": {"pipeline": 8, "execution-time": 46, "running": false, "tuple-count": 1}
"analyze": {"pipeline": 8, "cpu-cycles": 46, "running": false, "tuple-count": 1}
},
"right": {
"operator": "tablescan",
Expand All @@ -135,7 +135,7 @@
"debugName": {"classification": "nonsensitive", "value": "supplier"},
"earlyProbes": [{"builder": 13, "attributes": [3], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 7, "execution-time": 148, "running": false, "tuple-count": 19}
"analyze": {"pipeline": 7, "cpu-cycles": 148, "running": false, "tuple-count": 19}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v12"}},
"analyze": {"pipeline": 7, "memory-bytes": 18432, "tuple-count": 19}
Expand All @@ -151,7 +151,7 @@
"debugName": {"classification": "nonsensitive", "value": "partsupp"},
"earlyProbes": [{"builder": 12, "attributes": [1], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 6, "execution-time": 839, "running": false, "tuple-count": 58}
"analyze": {"pipeline": 6, "cpu-cycles": 839, "running": false, "tuple-count": 58}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v14"}},
"analyze": {"pipeline": 6, "memory-bytes": 18432, "tuple-count": 21}
Expand All @@ -161,12 +161,12 @@
"emptyGroups": false,
"aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v18"}}}],
"aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigNumeric", 38, 2]]}],
"analyze": {"pipeline": 1, "execution-time": 0, "memory-bytes": 18432, "running": true, "tuple-count": 0}
"analyze": {"pipeline": 1, "cpu-cycles": 0, "memory-bytes": 18432, "running": true, "tuple-count": 0}
},
"condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "v2"}, "right": {"expression": "div", "left": {"expression": "iuref", "iu": "v11"}, "right": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 0}}}},
"analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 0}
},
"analyze": {"pipeline": 0, "execution-time": 0, "memory-bytes": 0, "running": false, "tuple-count": 0}
"analyze": {"pipeline": 0, "cpu-cycles": 0, "memory-bytes": 0, "running": false, "tuple-count": 0}
},
"analyze": {"error": {"code": "22012", "message": {"original": "division by zero", "translation": "division by zero"}, "detail": null, "internalDetail": null, "hint": null}, "pipeline": 0}
}
6 changes: 3 additions & 3 deletions standalone-app/examples/hyper/tpch/tpch-q1-analyze.plan.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
"debugName": {"classification": "nonsensitive", "value": "lineitem"},
"restrictions": [{"attribute": 10, "mode": "<=", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2451059}}}],
"selectivity": 0.993007,
"analyze": {"pipeline": 2, "execution-time": 2717, "running": false, "tuple-count": 568}
"analyze": {"pipeline": 2, "cpu-cycles": 2717, "running": false, "tuple-count": 568}
},
"keyExpressions": [{"expression": {"value": {"expression": "iuref", "iu": "v15"}}, "iu": ["v", ["Char1"]]}, {"expression": {"value": {"expression": "iuref", "iu": "v16"}}, "iu": ["v2", ["Char1"]]}],
"groupingSets": [{"keyIndices": [0, 1], "coreIndices": [0, 1], "behavior": "regular"}],
"emptyGroups": false,
"aggExpressions": [{"value": {"expression": "iuref", "iu": "v11"}}, {"value": {"expression": "iuref", "iu": "v12"}}, {"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v13"}}, "right": {"expression": "iuref", "iu": "v12"}}}, {"value": {"expression": "mul", "left": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v13"}}, "right": {"expression": "iuref", "iu": "v12"}}, "right": {"expression": "add", "left": {"expression": "iuref", "iu": "v14"}, "right": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}}}}, {"value": {"expression": "iuref", "iu": "v13"}}],
"aggregates": [{"source": 4294967295, "operation": {"aggregate": "count"}, "iu": ["v10", ["BigInt"]]}, {"source": 0, "operation": {"aggregate": "avg"}, "iu": ["v7", ["Numeric", 16, 6]]}, {"source": 4, "operation": {"aggregate": "avg"}, "iu": ["v9", ["Numeric", 16, 6]]}, {"source": 3, "operation": {"aggregate": "sum"}, "iu": ["v6", ["BigNumeric", 38, 6]]}, {"source": 1, "operation": {"aggregate": "avg"}, "iu": ["v8", ["Numeric", 16, 6]]}, {"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v3", ["BigNumeric", 38, 2]]}, {"source": 1, "operation": {"aggregate": "sum"}, "iu": ["v4", ["BigNumeric", 38, 2]]}, {"source": 2, "operation": {"aggregate": "sum"}, "iu": ["v5", ["BigNumeric", 38, 4]]}],
"analyze": {"pipeline": 1, "execution-time": 187, "memory-bytes": 18432, "running": false, "tuple-count": 4}
"analyze": {"pipeline": 1, "cpu-cycles": 187, "memory-bytes": 18432, "running": false, "tuple-count": 4}
},
"analyze": {"pipeline": 0, "execution-time": 91, "memory-bytes": 262176, "running": false, "tuple-count": 4}
"analyze": {"pipeline": 0, "cpu-cycles": 91, "memory-bytes": 262176, "running": false, "tuple-count": 4}
},
"analyze": {"error": null, "pipeline": 0}
}
12 changes: 6 additions & 6 deletions standalone-app/examples/hyper/tpch/tpch-q10-analyze.plan.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"debugName": {"classification": "nonsensitive", "value": "orders"},
"restrictions": [{"attribute": 4, "mode": "[)", "value": {"expression": "const", "value": {"type": ["Date"], "value": 2449262}}, "value2": {"expression": "const", "value": {"type": ["Date"], "value": 2449354}}}],
"selectivity": 0.0703125,
"analyze": {"pipeline": 5, "execution-time": 136, "running": false, "tuple-count": 9}
"analyze": {"pipeline": 5, "cpu-cycles": 136, "running": false, "tuple-count": 9}
},
"right": {
"operator": "tablescan",
Expand All @@ -59,7 +59,7 @@
"debugName": {"classification": "nonsensitive", "value": "customer"},
"earlyProbes": [{"builder": 6, "attributes": [0], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 4, "execution-time": 284, "running": false, "tuple-count": 15}
"analyze": {"pipeline": 4, "cpu-cycles": 284, "running": false, "tuple-count": 15}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v12"}, "right": {"expression": "iuref", "iu": "v10"}},
"analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 9}
Expand All @@ -75,7 +75,7 @@
"debugName": {"classification": "nonsensitive", "value": "nation"},
"earlyProbes": [{"builder": 5, "attributes": [0], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 3, "execution-time": 145, "running": false, "tuple-count": 11}
"analyze": {"pipeline": 3, "cpu-cycles": 145, "running": false, "tuple-count": 11}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v19"}},
"analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 9}
Expand All @@ -92,7 +92,7 @@
"restrictions": [{"attribute": 8, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char1"], "value": 82}}}],
"earlyProbes": [{"builder": 4, "attributes": [0], "type": "lookup"}],
"selectivity": 0.265734,
"analyze": {"pipeline": 2, "execution-time": 411, "running": false, "tuple-count": 37}
"analyze": {"pipeline": 2, "cpu-cycles": 411, "running": false, "tuple-count": 37}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v21"}, "right": {"expression": "iuref", "iu": "v9"}},
"analyze": {"pipeline": 2, "memory-bytes": 18432, "tuple-count": 23}
Expand All @@ -102,9 +102,9 @@
"emptyGroups": false,
"aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "sub", "left": {"expression": "const", "value": {"type": ["Numeric", 1], "value": 1}}, "right": {"expression": "iuref", "iu": "v23"}}, "right": {"expression": "iuref", "iu": "v22"}}}],
"aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v3", ["BigNumeric", 38, 4]]}],
"analyze": {"pipeline": 1, "execution-time": 243, "memory-bytes": 18432, "running": false, "tuple-count": 8}
"analyze": {"pipeline": 1, "cpu-cycles": 243, "memory-bytes": 18432, "running": false, "tuple-count": 8}
},
"analyze": {"pipeline": 0, "execution-time": 175, "heap-gc-passes": 0, "memory-bytes": 262208, "running": false, "tuple-count": 8}
"analyze": {"pipeline": 0, "cpu-cycles": 175, "heap-gc-passes": 0, "memory-bytes": 262208, "running": false, "tuple-count": 8}
},
"analyze": {"error": null, "pipeline": 0}
}
18 changes: 9 additions & 9 deletions standalone-app/examples/hyper/tpch/tpch-q11-analyze.plan.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"debugName": {"classification": "nonsensitive", "value": "nation"},
"restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "GERMANY"}}}],
"selectivity": 0.04,
"analyze": {"pipeline": 5, "execution-time": 485, "running": false, "tuple-count": 1}
"analyze": {"pipeline": 5, "cpu-cycles": 485, "running": false, "tuple-count": 1}
},
"right": {
"operator": "tablescan",
Expand All @@ -63,7 +63,7 @@
"debugName": {"classification": "nonsensitive", "value": "supplier"},
"earlyProbes": [{"builder": 7, "attributes": [3], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 4, "execution-time": 700, "running": false, "tuple-count": 19}
"analyze": {"pipeline": 4, "cpu-cycles": 700, "running": false, "tuple-count": 19}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v6"}, "right": {"expression": "iuref", "iu": "v3"}},
"analyze": {"pipeline": 4, "memory-bytes": 18432, "tuple-count": 19}
Expand All @@ -79,7 +79,7 @@
"debugName": {"classification": "nonsensitive", "value": "partsupp"},
"earlyProbes": [{"builder": 6, "attributes": [1], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 3, "execution-time": 957, "running": false, "tuple-count": 58}
"analyze": {"pipeline": 3, "cpu-cycles": 957, "running": false, "tuple-count": 58}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v7"}, "right": {"expression": "iuref", "iu": "v5"}},
"analyze": {"pipeline": 3, "memory-bytes": 18432, "tuple-count": 21}
Expand All @@ -88,7 +88,7 @@
"emptyGroups": true,
"aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v9"}, "right": {"expression": "iuref", "iu": "v8"}}}],
"aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v10", ["BigNumeric", 38, 2, "nullable"]]}],
"analyze": {"pipeline": 2, "execution-time": 12, "memory-bytes": 0, "running": false, "tuple-count": 1}
"analyze": {"pipeline": 2, "cpu-cycles": 12, "memory-bytes": 0, "running": false, "tuple-count": 1}
},
"values": [{"iu": ["v11", ["BigNumeric", 38, 6, "nullable"]], "value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v10"}, "right": {"expression": "const", "value": {"type": ["Numeric", 5, 4], "value": 1}}}}],
"analyze": {"pipeline": 2, "tuple-count": 1}
Expand Down Expand Up @@ -121,7 +121,7 @@
"debugName": {"classification": "nonsensitive", "value": "nation"},
"restrictions": [{"attribute": 1, "mode": "=", "value": {"expression": "const", "value": {"type": ["Char", 25], "value": "GERMANY"}}}],
"selectivity": 0.04,
"analyze": {"pipeline": 8, "execution-time": 41, "running": false, "tuple-count": 1}
"analyze": {"pipeline": 8, "cpu-cycles": 41, "running": false, "tuple-count": 1}
},
"right": {
"operator": "tablescan",
Expand All @@ -134,7 +134,7 @@
"debugName": {"classification": "nonsensitive", "value": "supplier"},
"earlyProbes": [{"builder": 13, "attributes": [3], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 7, "execution-time": 129, "running": false, "tuple-count": 19}
"analyze": {"pipeline": 7, "cpu-cycles": 129, "running": false, "tuple-count": 19}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v15"}, "right": {"expression": "iuref", "iu": "v12"}},
"analyze": {"pipeline": 7, "memory-bytes": 18432, "tuple-count": 19}
Expand All @@ -150,7 +150,7 @@
"debugName": {"classification": "nonsensitive", "value": "partsupp"},
"earlyProbes": [{"builder": 12, "attributes": [1], "type": "lookup"}],
"selectivity": 1,
"analyze": {"pipeline": 6, "execution-time": 749, "running": false, "tuple-count": 58}
"analyze": {"pipeline": 6, "cpu-cycles": 749, "running": false, "tuple-count": 58}
},
"condition": {"expression": "comparison", "mode": "=", "left": {"expression": "iuref", "iu": "v17"}, "right": {"expression": "iuref", "iu": "v14"}},
"analyze": {"pipeline": 6, "memory-bytes": 18432, "tuple-count": 21}
Expand All @@ -160,12 +160,12 @@
"emptyGroups": false,
"aggExpressions": [{"value": {"expression": "mul", "left": {"expression": "iuref", "iu": "v19"}, "right": {"expression": "iuref", "iu": "v18"}}}],
"aggregates": [{"source": 0, "operation": {"aggregate": "sum"}, "iu": ["v2", ["BigNumeric", 38, 2]]}],
"analyze": {"pipeline": 1, "execution-time": 254, "memory-bytes": 18432, "running": false, "tuple-count": 21}
"analyze": {"pipeline": 1, "cpu-cycles": 254, "memory-bytes": 18432, "running": false, "tuple-count": 21}
},
"condition": {"expression": "comparison", "mode": ">", "left": {"expression": "iuref", "iu": "v2"}, "right": {"expression": "iuref", "iu": "v11"}},
"analyze": {"pipeline": 1, "memory-bytes": 18432, "tuple-count": 21}
},
"analyze": {"pipeline": 0, "execution-time": 233, "memory-bytes": 262312, "running": false, "tuple-count": 21}
"analyze": {"pipeline": 0, "cpu-cycles": 233, "memory-bytes": 262312, "running": false, "tuple-count": 21}
},
"analyze": {"error": null, "pipeline": 0}
}
Loading
Loading