Skip to content

Query Profiling — definition export + execution analysis (closes #342) - #343

Merged
nockawa merged 1 commit into
mainfrom
feature/342-query-profiling
May 11, 2026
Merged

nockawa merged 1 commit into
mainfrom
feature/342-query-profiling

Conversation

@nockawa

@nockawa nockawa commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes the #342 umbrella (Query Profiling — definition export + execution analysis). Lands all 9 phases (P0–P8) on a single branch, plus a small follow-up tightening the class-based-system marker.

Design doc: claude/design/Profiler/11-query-definition-export.md

What's included

Sub-issues closed (all 9 already marked Done on the project board, acceptance checklists ticked / deferrals annotated in their bodies):

Bonus polish (this branch only):

  • ISystem marker interface implemented by QuerySystem / CallbackSystem / PipelineSystem — exposes Name (set after Configure) and Index (set after Build) so class-based systems can read their own runtime identity. SystemRegistration.SystemInstance tightened from object → ISystem; SystemSourceResolver.ResolveOverride(...) signature follows.
  • OwnerSystemIdx field added to QueryPlanEvent (mask 0x20) to attribute query executions to their owning system in multi-threaded mode, where the worker-thread parent-span chain doesn't reach the system span.

Known deferrals (annotated per sub-issue)

  • Playwright canaries for P5–P8 — unit + component tests cover the pure logic; e2e canaries deferred to a polish pass after first real dogfood session.
  • Polymorphic queries — no SubtreeExec node type. No current workload exercises polymorphic queries; design left in place for when one appears.
  • "Triggered at" link in Execution Inspector — QueryExecutionDto doesn't carry execution-site source; panel falls back to "Triggered by: <SystemName>" (which already lands on the user's Execute override for class-based systems via BTree telemetry instrumentation #10's PDB resolver).
  • Plan Tree ↔ EI bidirectional sync — EI → Plan Tree (Show tree) works; reverse direction (Plan node click → EI row) is unwired.

A single polish-pass follow-up issue is the natural home for these — ~1 day total.

Verification

  • dotnet test test/Typhon.Engine.Tests/Typhon.Engine.Tests.csproj — 3587 passed, 33 skipped, 0 failed
  • dotnet test test/Typhon.Workbench.Tests/Typhon.Workbench.Tests.csproj — 282 passed, 1 skipped, 0 failed
  • ClientApp Vitest — 607 passed
  • Full solution build — clean, 0 errors, 77 pre-existing warnings (unchanged)

Test plan

  • All 9 sub-issue acceptance checklists audited; met items ticked, deferrals annotated in their bodies
  • Engine regression suite green
  • Workbench regression suite green
  • ClientApp unit suite green
  • Manual end-to-end dogfood against an AntHill profile trace (Query Catalog → System DAG badge → Plan Tree → Execution Inspector hand-offs)

Doc PR

Companion docs PR: nockawa/typhon-claude (same branch).

@nockawa
nockawa merged commit e5c9894 into main May 11, 2026
6 checks passed
@nockawa
nockawa deleted the feature/342-query-profiling branch May 11, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant