You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds two debugging capabilities to the pipeline execution system:
1. Static pipeline graph: after query initialization, prints all pipelines
and their dependency relationships to stderr.
2. Runtime timing trace: records wall-clock start/end times for each
pipeline and outputs a Chrome Trace JSON report to stderr on query
completion. The JSON is loadable in https://ui.perfetto.dev/ or
chrome://tracing for an interactive Gantt visualization.
Usage:
SET enable_pipeline_trace = true;
SELECT ...; -- pipeline graph + Chrome trace JSON go to stderr
New files:
src/include/duckdb/parallel/pipeline_tracer.hpp
src/parallel/pipeline_tracer.cpp
Key changes:
- Pipeline: add pipeline_id, start_time_ns, end_time_ns, MarkStart/MarkEnd
- PipelineEvent: call MarkStart in Schedule(), MarkEnd in FinishEvent()
- PipelineFinishEvent: call MarkEnd in FinishEvent() (last-call wins,
so finalization time is captured for base pipelines)
- Executor: assign IDs, save traced_pipelines ref, print graph at init
and Chrome trace JSON before pipelines.clear()
- Settings: add enable_pipeline_trace (local bool, default false)
https://claude.ai/code/session_01UV8WQWq1RyBsyTAxsbu4yG
Copy file name to clipboardExpand all lines: src/common/settings.json
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -514,6 +514,14 @@
514
514
"default_scope": "global",
515
515
"default_value": "false"
516
516
},
517
+
{
518
+
"name": "enable_pipeline_trace",
519
+
"description": "Enables pipeline trace logging: prints the pipeline graph and outputs a Chrome Trace JSON timing report to stderr on query completion",
520
+
"type": "BOOLEAN",
521
+
"scope": "local",
522
+
"struct": "EnablePipelineTraceSetting",
523
+
"custom_implementation": true
524
+
},
517
525
{
518
526
"name": "enable_profiling",
519
527
"description": "Enables profiling, and sets the output format (JSON, QUERY_TREE, QUERY_TREE_OPTIMIZER)",
0 commit comments