• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2018 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 = "proto2";
18
19package perfetto.protos;
20
21// The wrapping result of any metric builder function in trace processor. This
22// is an internal implementation detail of trace processor so should not be
23// relied on.
24message ProtoBuilderResult {
25  // Whether the result is a singular proto builder result or the result of
26  // a repeated field builder.
27  optional bool is_repeated = 1;
28  oneof result {
29    SingleBuilderResult single = 2;
30    RepeatedBuilderResult repeated = 3;
31  }
32}
33
34// The result of a repeated field function for a metric proto in trace
35// processor. This is an internal implementation detail of trace processor so
36// should not be relied on.
37message RepeatedBuilderResult {
38  message Value {
39    oneof data {
40      int64 int_value = 1;
41      string string_value = 2;
42      double double_value = 3;
43      bytes bytes_value = 4;
44    }
45  }
46  repeated Value value = 1;
47}
48
49// The result of a builder function for a metric proto in trace processor. This
50// is an internal implementation detail of trace processor so should not be
51// relied on.
52message SingleBuilderResult {
53  // The type of the result. The possible values are given by
54  // FieldDescriptorProto::Type.
55  optional uint32 type = 1;
56
57  // The type name of the result if the result is a message or enum type.
58  optional string type_name = 2;
59
60  // The raw proto bytes of a message.
61  optional bytes protobuf = 3;
62}
63