Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 1 | /* |
2 | * Copyright (C) 2017 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 | */ | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 16 | |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 17 | syntax = "proto2"; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 18 | option optimize_for = LITE_RUNTIME; |
19 | |||||
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 20 | package android.os.statsd; |
21 | |||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 22 | option java_package = "com.android.internal.os"; |
23 | option java_outer_classname = "StatsdConfigProto"; | ||||
24 | |||||
Primiano Tucci | e4d4491 | 2018-01-10 12:14:50 +0000 | [diff] [blame] | 25 | import "frameworks/base/cmds/statsd/src/perfetto/perfetto_config.proto"; |
26 | |||||
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 27 | enum Position { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 28 | POSITION_UNKNOWN = 0; |
29 | |||||
30 | FIRST = 1; | ||||
31 | |||||
32 | LAST = 2; | ||||
33 | |||||
34 | ANY = 3; | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 35 | } |
36 | |||||
Yangster-mac | b814481 | 2018-01-04 10:56:23 -0800 | [diff] [blame] | 37 | enum TimeUnit { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 38 | TIME_UNIT_UNSPECIFIED = 0; |
39 | ONE_MINUTE = 1; | ||||
40 | FIVE_MINUTES = 2; | ||||
41 | TEN_MINUTES = 3; | ||||
42 | THIRTY_MINUTES = 4; | ||||
43 | ONE_HOUR = 5; | ||||
44 | THREE_HOURS = 6; | ||||
45 | SIX_HOURS = 7; | ||||
46 | TWELVE_HOURS = 8; | ||||
47 | ONE_DAY = 9; | ||||
48 | CTS = 1000; | ||||
Yangster-mac | b814481 | 2018-01-04 10:56:23 -0800 | [diff] [blame] | 49 | } |
50 | |||||
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 51 | message FieldMatcher { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 52 | optional int32 field = 1; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 53 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 54 | optional Position position = 2; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 55 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 56 | repeated FieldMatcher child = 3; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 57 | } |
58 | |||||
59 | message FieldValueMatcher { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 60 | optional int32 field = 1; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 61 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 62 | optional Position position = 2; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 63 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 64 | oneof value_matcher { |
65 | bool eq_bool = 3; | ||||
66 | string eq_string = 4; | ||||
67 | int32 eq_int = 5; | ||||
David Chen | dd89694 | 2017-09-26 11:44:40 -0700 | [diff] [blame] | 68 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 69 | int64 lt_int = 6; |
70 | int64 gt_int = 7; | ||||
71 | float lt_float = 8; | ||||
72 | float gt_float = 9; | ||||
David Chen | dd89694 | 2017-09-26 11:44:40 -0700 | [diff] [blame] | 73 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 74 | int64 lte_int = 10; |
75 | int64 gte_int = 11; | ||||
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 76 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 77 | MessageMatcher matches_tuple = 12; |
78 | } | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 79 | } |
80 | |||||
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 81 | message MessageMatcher { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 82 | repeated FieldValueMatcher field_value_matcher = 1; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 83 | } |
84 | |||||
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 85 | enum LogicalOperation { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 86 | LOGICAL_OPERATION_UNSPECIFIED = 0; |
87 | AND = 1; | ||||
88 | OR = 2; | ||||
89 | NOT = 3; | ||||
90 | NAND = 4; | ||||
91 | NOR = 5; | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 92 | } |
93 | |||||
Stefan Lafon | b8c9aa8 | 2017-12-03 14:27:25 -0800 | [diff] [blame] | 94 | message SimpleAtomMatcher { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 95 | optional int32 atom_id = 1; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 96 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 97 | repeated FieldValueMatcher field_value_matcher = 2; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 98 | } |
99 | |||||
Stefan Lafon | b8c9aa8 | 2017-12-03 14:27:25 -0800 | [diff] [blame] | 100 | message AtomMatcher { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 101 | optional int64 id = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 102 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 103 | message Combination { |
104 | optional LogicalOperation operation = 1; | ||||
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 105 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 106 | repeated int64 matcher = 2; |
107 | } | ||||
108 | oneof contents { | ||||
109 | SimpleAtomMatcher simple_atom_matcher = 2; | ||||
110 | Combination combination = 3; | ||||
111 | } | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 112 | } |
113 | |||||
Stefan Lafon | 12d01fa | 2017-12-04 20:56:09 -0800 | [diff] [blame] | 114 | message SimplePredicate { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 115 | optional int64 start = 1; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 116 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 117 | optional int64 stop = 2; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 118 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 119 | optional bool count_nesting = 3 [default = true]; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 120 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 121 | optional int64 stop_all = 4; |
Yao Chen | 5154a37 | 2017-10-30 22:57:06 -0700 | [diff] [blame] | 122 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 123 | enum InitialValue { |
124 | UNKNOWN = 0; | ||||
125 | FALSE = 1; | ||||
126 | } | ||||
127 | optional InitialValue initial_value = 5 [default = FALSE]; | ||||
Yao Chen | 967b205 | 2017-11-07 16:36:43 -0800 | [diff] [blame] | 128 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 129 | optional FieldMatcher dimensions = 6; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 130 | } |
131 | |||||
Stefan Lafon | 12d01fa | 2017-12-04 20:56:09 -0800 | [diff] [blame] | 132 | message Predicate { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 133 | optional int64 id = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 134 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 135 | message Combination { |
136 | optional LogicalOperation operation = 1; | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 137 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 138 | repeated int64 predicate = 2; |
139 | } | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 140 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 141 | oneof contents { |
142 | SimplePredicate simple_predicate = 2; | ||||
143 | Combination combination = 3; | ||||
144 | } | ||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 145 | } |
146 | |||||
Stefan Lafon | a5b5191 | 2017-12-05 21:43:52 -0800 | [diff] [blame] | 147 | message MetricConditionLink { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 148 | optional int64 condition = 1; |
Yangster-mac | d1815dc | 2017-11-13 21:43:15 -0800 | [diff] [blame] | 149 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 150 | optional FieldMatcher fields_in_what = 2; |
Yangster-mac | d1815dc | 2017-11-13 21:43:15 -0800 | [diff] [blame] | 151 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 152 | optional FieldMatcher fields_in_condition = 3; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 153 | } |
154 | |||||
Chenjie Yu | d9dfda7 | 2017-12-11 17:41:20 -0800 | [diff] [blame] | 155 | message FieldFilter { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 156 | optional bool include_all = 1 [default = false]; |
157 | optional FieldMatcher fields = 2; | ||||
Chenjie Yu | d9dfda7 | 2017-12-11 17:41:20 -0800 | [diff] [blame] | 158 | } |
159 | |||||
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 160 | message EventMetric { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 161 | optional int64 id = 1; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 162 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 163 | optional int64 what = 2; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 164 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 165 | optional int64 condition = 3; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 166 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 167 | repeated MetricConditionLink links = 4; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 168 | } |
169 | |||||
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 170 | message CountMetric { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 171 | optional int64 id = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 172 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 173 | optional int64 what = 2; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 174 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 175 | optional int64 condition = 3; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 176 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 177 | optional FieldMatcher dimensions_in_what = 4; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 178 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 179 | optional FieldMatcher dimensions_in_condition = 7; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 180 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 181 | optional TimeUnit bucket = 5; |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 182 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 183 | repeated MetricConditionLink links = 6; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 184 | } |
185 | |||||
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 186 | message DurationMetric { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 187 | optional int64 id = 1; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 188 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 189 | optional int64 what = 2; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 190 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 191 | optional int64 condition = 3; |
Yao Chen | 5c925ad | 2017-11-15 14:15:46 -0800 | [diff] [blame] | 192 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 193 | repeated MetricConditionLink links = 4; |
Yao Chen | 5c925ad | 2017-11-15 14:15:46 -0800 | [diff] [blame] | 194 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 195 | enum AggregationType { |
196 | SUM = 1; | ||||
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 197 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 198 | MAX_SPARSE = 2; |
199 | } | ||||
200 | optional AggregationType aggregation_type = 5 [default = SUM]; | ||||
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 201 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 202 | optional FieldMatcher dimensions_in_what = 6; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 203 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 204 | optional FieldMatcher dimensions_in_condition = 8; |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 205 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 206 | optional TimeUnit bucket = 7; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 207 | } |
208 | |||||
209 | message GaugeMetric { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 210 | optional int64 id = 1; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 211 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 212 | optional int64 what = 2; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 213 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 214 | optional FieldFilter gauge_fields_filter = 3; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 215 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 216 | optional int64 condition = 4; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 217 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 218 | optional FieldMatcher dimensions_in_what = 5; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 219 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 220 | optional FieldMatcher dimensions_in_condition = 8; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 221 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 222 | optional TimeUnit bucket = 6; |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 223 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 224 | repeated MetricConditionLink links = 7; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 225 | } |
226 | |||||
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 227 | message ValueMetric { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 228 | optional int64 id = 1; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 229 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 230 | optional int64 what = 2; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 231 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 232 | optional FieldMatcher value_field = 3; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 233 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 234 | optional int64 condition = 4; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 235 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 236 | optional FieldMatcher dimensions_in_what = 5; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 237 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 238 | optional FieldMatcher dimensions_in_condition = 9; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 239 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 240 | optional TimeUnit bucket = 6; |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 241 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 242 | repeated MetricConditionLink links = 7; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 243 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 244 | enum AggregationType { |
245 | SUM = 1; | ||||
246 | } | ||||
247 | optional AggregationType aggregation_type = 8 [default = SUM]; | ||||
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 248 | } |
249 | |||||
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 250 | message Alert { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 251 | optional int64 id = 1; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 252 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 253 | optional int64 metric_id = 2; |
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 254 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 255 | optional int32 num_buckets = 3; |
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 256 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 257 | optional int32 refractory_period_secs = 4; |
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 258 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 259 | optional double trigger_if_sum_gt = 5; |
Stefan Lafon | cfed20b | 2017-11-18 09:26:53 -0800 | [diff] [blame] | 260 | } |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 261 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 262 | message Alarm { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 263 | optional int64 id = 1; |
264 | |||||
265 | optional int64 offset_millis = 2; | ||||
266 | |||||
267 | optional int64 period_millis = 3; | ||||
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 268 | } |
269 | |||||
270 | message IncidentdDetails { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 271 | repeated int32 section = 1; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 272 | } |
273 | |||||
274 | message PerfettoDetails { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 275 | optional perfetto.protos.TraceConfig trace_config = 1; |
276 | } | ||||
277 | |||||
278 | message BroadcastSubscriberDetails { | ||||
279 | optional int64 subscriber_id = 1; | ||||
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 280 | } |
281 | |||||
282 | message Subscription { | ||||
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 283 | optional int64 id = 1; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 284 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 285 | enum RuleType { |
286 | RULE_TYPE_UNSPECIFIED = 0; | ||||
287 | ALARM = 1; | ||||
288 | ALERT = 2; | ||||
289 | } | ||||
290 | optional RuleType rule_type = 2; | ||||
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 291 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 292 | optional int64 rule_id = 3; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 293 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 294 | oneof subscriber_information { |
295 | IncidentdDetails incidentd_details = 4; | ||||
296 | PerfettoDetails perfetto_details = 5; | ||||
297 | BroadcastSubscriberDetails broadcast_subscriber_details = 6; | ||||
298 | } | ||||
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 299 | } |
300 | |||||
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 301 | message StatsdConfig { |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 302 | optional int64 id = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 303 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 304 | repeated EventMetric event_metric = 2; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 305 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 306 | repeated CountMetric count_metric = 3; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 307 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 308 | repeated ValueMetric value_metric = 4; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 309 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 310 | repeated GaugeMetric gauge_metric = 5; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 311 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 312 | repeated DurationMetric duration_metric = 6; |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 313 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 314 | repeated AtomMatcher atom_matcher = 7; |
Yangster | 1d4d686 | 2017-10-31 12:58:51 -0700 | [diff] [blame] | 315 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 316 | repeated Predicate predicate = 8; |
Yang Lu | 3eba621 | 2017-10-25 19:54:45 -0700 | [diff] [blame] | 317 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 318 | repeated Alert alert = 9; |
Yao Chen | d10f7b1 | 2017-12-18 12:53:50 -0800 | [diff] [blame] | 319 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 320 | repeated Alarm alarm = 10; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 321 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 322 | repeated Subscription subscription = 11; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 323 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 324 | repeated string allowed_log_source = 12; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 325 | |
Yangster | b84e8b1 | 2018-01-22 16:18:34 -0800 | [diff] [blame] | 326 | repeated int64 no_report_metric = 13; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 327 | } |