Repository navigation
Closed
9 / 99 of 9 issues completedClosed
9 / 99 of 9 issues completed
Copy link
Description
Summary
Capture every query that runs during a profiling session as two distinct things — its definition (structural query: filters, sort, target archetype, plus the user's construction file/line) and its executions (per-call instances with actual args, the efficiency chain of spans already in the trace, and — for user-triggered terminals — the user's execution file/line). Surface everything in three new Workbench panels: Query Catalog, Query Plan Tree (graphical), and Execution Inspector.
Design doc: claude/design/Profiler/11-query-definition-export.md
Highlights
- Use the existing
ViewBase.ViewIdas the dedup key forView-based queries; add a matchingEcsQueryIdonEcsQueryso 1-1 mapping between a runtime query instance and its trace-side definition holds for both pipelines. - Both source-location flavors (construction and execution) captured via compile-time
[CallerFilePath]/[CallerLineNumber]/[CallerMemberName]on the public Query API — zero runtime cost, baked at the user's call site. - For scheduler-driven
View.Refresh(no user execution site), the Workbench shows the owning system instead, already attributed on the span. - New trace sections:
QueryDefinitionTable,QuerySourceStringTable. Trace version bumps v15 → v16. - New Workbench panels reuse
@xyflow/react+dagre(already inSystemDagPanel,SchemaRelationshipsGraph) — no new dependencies.
Phases
Each phase is a separately-trackable sub-issue. Recommended order matches dependencies; P5 alone is a dogfood-ready ship point.
- Query Profiling P0 — Engine identity + source-location capture surface #333
- Query Profiling P1 — Trace events + QuerySourceStringTable + v16 wire format #334
- Query Profiling P2 — Engine-side emission (Describe / Args / extended QueryPlanEvent) #335
- Query Profiling P3 — Reader-side parser + Workbench DTOs #336
- Query Profiling P4 — Sidecar cache aggregations + catalog/execution endpoints #337
- Query Profiling P5 — Workbench Query Catalog panel #338
- Query Profiling P6 — Workbench Query Plan Tree panel (graphical) #339
- Query Profiling P7 — Workbench Execution Inspector panel #340
- Query Profiling P8 — System DAG Queries-badge integration #341
Estimate
~7 days end-to-end.
Sub-issues
Collapse Sub-issuesSub-issues
Loading 9 sub-issues
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Priority
None yet
Activity
Add query profiling export + Workbench catalog/plan-tree/inspector pa…
Sync the client's instant-kind mirror with the engine ladder, and gua…