Skip to content

tp: add structured query mode to query subcommand#5198

Open
LalitMaganti wants to merge 2 commits intomainfrom
dev/lalitm/tp-shell-structured-query-mode
Open

tp: add structured query mode to query subcommand#5198
LalitMaganti wants to merge 2 commits intomainfrom
dev/lalitm/tp-shell-structured-query-mode

Conversation

@LalitMaganti
Copy link
Member

@LalitMaganti LalitMaganti commented Mar 19, 2026

Summary

  • Add --structured-query-id and --summary-spec flags to the query
    subcommand, using the Summarizer API to materialize and print a single
    structured query result. Intended for debugging/testing.
  • Remove the legacy ExecuteStructuredQuery() from summary.{h,cc} and the
    old --structured-query-spec/--structured-query-id classic flags.
  • Migrate diff test infra to use the new subcommand syntax.

Stack

Test plan

  • perfetto_integrationtests --gtest_filter="TraceProcessorShellIntegrationTest.*" (45 tests pass)
  • tools/diff_test_trace_processor.py --name-filter=".*structured.*" (4 tests pass)

Add --structured-query-id and --structured-query-spec flags to the
query subcommand. When set, uses the Summarizer API to materialize
a single structured query by ID from the provided spec files, then
prints the result table. Intended for debugging and testing.

Usage:
  tp query --structured-query-id ID \
    --structured-query-spec spec.textproto trace.pb
@LalitMaganti LalitMaganti requested a review from a team as a code owner March 19, 2026 15:20
@github-actions
Copy link

github-actions bot commented Mar 19, 2026

@LalitMaganti LalitMaganti changed the title dev/lalitm/tp shell structured query mode tp: add structured query mode to query subcommand Mar 19, 2026
Remove the old --structured-query-spec/--structured-query-id classic
flags and the ExecuteStructuredQuery() function from summary.{h,cc}.
These are replaced by the Summarizer API in the query subcommand.

Rename --structured-query-spec to --summary-spec on the query
subcommand since these are summary spec files. Migrate the diff test
infra to use the new subcommand syntax.
@LalitMaganti LalitMaganti force-pushed the dev/lalitm/tp-shell-structured-query-mode branch from 2c169bd to 85119f1 Compare March 19, 2026 15:33
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