Skip to content

Docs: unify TraceLens metrics reference (CSV + TraceIndex SQL) - #981

Open
ajassani wants to merge 18 commits into
mainfrom
ajassani/tracelens-metrics-docs
Open

Docs: unify TraceLens metrics reference (CSV + TraceIndex SQL)#981
ajassani wants to merge 18 commits into
mainfrom
ajassani/tracelens-metrics-docs

Conversation

@ajassani

@ajassani ajassani commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Tracks #982.

  • Document --report-root\ in the TraceIndex how-to (Kyle review on TraceIndex: build queryable TraceLens report catalogs #674).
  • Replace \perf-report-columns.md\ with \ racelens-metrics.md: shared intro, In performance reports (CSV/Excel), and In TraceIndex catalogs (SQLite) sections.
  • Update TOC and cross-links across how-to and conceptual docs.

Stacked on #674 (\�jassani/traceindex-feature) so Kyle's doc comments can land separately from the TraceIndex code changes.

Test plan

  • \sphinx-build\ / Read the Docs preview renders \ racelens-metrics\ and updated \ race-index\ how-to
  • Links from conceptual/how-to pages resolve to the new metrics page

ajassani and others added 18 commits August 24, 2026 14:25
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Map Kernel stream and category kernel-time_ms columns, cover import with checked-in report fixtures, and Black-format the new files.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Parse perf_params and kernel_details_summary from Python repr into JSON so
they are queryable. Kernel rows now come from each unified op's
kernel_details_summary with a unified_row_id FK, replacing the flat
kernel_summary.csv import. Add gemm_perf, sdpa_perf, and conv_perf satellite
tables keyed on unified_row_id for shape-based SQL. Update the how-to schema
diagram and tests accordingly.

Co-authored-by: Cursor <cursoragent@cursor.com>
The table holds one row per kernel belonging to a specific op (via
unified_row_id), not the aggregate kernel_summary.csv sheet. Rename it to
op_kernels to avoid colliding with that report sheet name and to reflect that
each row is a per-op kernel. Update indexes, ingest, docs diagram, and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document what each test in test_trace_index.py verifies so the suite reads as a
table of contents for the catalog behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add an example-queries section to the trace-index how-to showing depthwise
convolution and longest-context attention lookups against the shape satellite
tables, so shape questions are SQL filters rather than trace reopens.

Co-authored-by: Cursor <cursoragent@cursor.com>
Include sample result tables and short takeaways for the depthwise-convolution
and longest-attention example queries so the how-to shows the payoff of the
shape satellite tables, not just the SQL.

Co-authored-by: Cursor <cursoragent@cursor.com>
Catalog ingest is append/build only. Remove the unused directory scanner and
stop exporting import_report_dir; existing CSV reports go through append
--report-dir. Tests for real report fixtures now use that public path.

Co-authored-by: Cursor <cursoragent@cursor.com>
The HTTP query server and sqlite-sql intentionally run caller-provided SELECT
statements. They are already restricted to a single read-only statement and
opened with SQLite query_only/mode=ro. Add CodeQL suppressions so that
expected use is not reported as SQL injection.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover health, tables, GET/POST /query, write rejection, 404s, and result
truncation. Close SQLite connections in the handler; a connection context
manager does not close the DB and leaked handles in tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract write_stub_trace/write_mini_report fixtures, use a query_server context manager for HTTP server lifecycle, and merge the two server test functions. Drop redundant store-boundary test covered by append/import paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
Address Kyle review: document --report-root for generated reports, add trace-index-catalog-schema.md for SQL column lookup (separate from perf-report-columns CSV reference), and cross-link from the how-to.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move try/except into handle_query so GET and POST /query return the same 400 JSON errors. Cross-link perf-report-columns (semantics) with catalog schema (SQL mapping).

Co-authored-by: Cursor <cursoragent@cursor.com>
Rename perf-report-columns to tracelens-metrics.md with shared intro, an In performance reports section, and an In TraceIndex catalogs section. Remove the separate catalog schema page; update TOC and cross-links.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gabeweisz

Copy link
Copy Markdown
Collaborator

LGTM - fix the conflicts and I'll approve

Base automatically changed from ajassani/traceindex-feature to main September 2, 2026 20:43
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.

2 participants