1/* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto3"; 18 19package perfetto.protos; 20 21import "protos/perfetto/trace_processor/trace_processor.proto"; 22 23// gRPC Interface for a Bigtrace Worker 24// 25// Workers are owned by an "Orchestrator" which forward traces from requests by 26// end users. Workers are responsible for loading the traces with 27// TraceProcessor and executing the requests. 28service BigtraceWorker { 29 // Executes a SQL query on the specified trace and returns a stream of 30 // execution responses. Note that this method returns a stream because each 31 // trace can return >1 result due to chunking of protos at the 32 // TraceProcessor::QueryResult level. 33 rpc QueryTrace(BigtraceQueryTraceArgs) returns (BigtraceQueryTraceResponse); 34} 35 36// Request/Response for QueryTrace. 37message BigtraceQueryTraceArgs { 38 optional string trace = 1; 39 optional string sql_query = 2; 40} 41message BigtraceQueryTraceResponse { 42 optional string trace = 1; 43 repeated QueryResult result = 2; 44} 45