tp: add structured query mode to query subcommand#5198
Open
LalitMaganti wants to merge 2 commits intomainfrom
Open
tp: add structured query mode to query subcommand#5198LalitMaganti wants to merge 2 commits intomainfrom
LalitMaganti wants to merge 2 commits intomainfrom
Conversation
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
🎨 Perfetto UI Builds
|
2 tasks
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.
2c169bd to
85119f1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--structured-query-idand--summary-specflags to thequerysubcommand, using the Summarizer API to materialize and print a single
structured query result. Intended for debugging/testing.
ExecuteStructuredQuery()from summary.{h,cc} and theold
--structured-query-spec/--structured-query-idclassic flags.Stack
Test plan
perfetto_integrationtests --gtest_filter="TraceProcessorShellIntegrationTest.*"(45 tests pass)tools/diff_test_trace_processor.py --name-filter=".*structured.*"(4 tests pass)