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