Yao Chen | ab273e2 | 2017-09-06 12:53:50 -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 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 16 | |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 17 | syntax = "proto2"; |
| 18 | |
| 19 | package android.os.statsd; |
| 20 | |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 21 | option java_package = "com.android.os"; |
| 22 | option java_outer_classname = "StatsLog"; |
| 23 | |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 24 | import "frameworks/base/cmds/statsd/src/atoms.proto"; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 25 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 26 | message DimensionsValue { |
| 27 | optional int32 field = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 28 | |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 29 | oneof value { |
| 30 | string value_str = 2; |
Chenjie Yu | d9dfda7 | 2017-12-11 17:41:20 -0800 | [diff] [blame] | 31 | int32 value_int = 3; |
| 32 | int64 value_long = 4; |
| 33 | bool value_bool = 5; |
| 34 | float value_float = 6; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 35 | DimensionsValueTuple value_tuple = 7; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 36 | uint64 value_str_hash = 8; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 37 | } |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 38 | } |
| 39 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 40 | message DimensionsValueTuple { |
| 41 | repeated DimensionsValue dimensions_value = 1; |
| 42 | } |
| 43 | |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 44 | message EventMetricData { |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 45 | optional int64 elapsed_timestamp_nanos = 1; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 46 | |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 47 | optional Atom atom = 2; |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 48 | |
Bookatz | fe2dde8 | 2018-08-28 13:24:40 -0700 | [diff] [blame] | 49 | optional int64 wall_clock_timestamp_nanos = 3 [deprecated = true]; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | message CountBucketInfo { |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 53 | optional int64 start_bucket_elapsed_nanos = 1; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 54 | |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 55 | optional int64 end_bucket_elapsed_nanos = 2; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 56 | |
| 57 | optional int64 count = 3; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 58 | |
| 59 | optional int64 bucket_num = 4; |
| 60 | |
| 61 | optional int64 start_bucket_elapsed_millis = 5; |
| 62 | |
| 63 | optional int64 end_bucket_elapsed_millis = 6; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | message CountMetricData { |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 67 | optional DimensionsValue dimensions_in_what = 1; |
| 68 | |
Yangster-mac | 16fc72f | 2018-01-18 13:18:01 -0800 | [diff] [blame] | 69 | optional DimensionsValue dimensions_in_condition = 2; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 70 | |
Yangster-mac | 16fc72f | 2018-01-18 13:18:01 -0800 | [diff] [blame] | 71 | repeated CountBucketInfo bucket_info = 3; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 72 | |
| 73 | repeated DimensionsValue dimension_leaf_values_in_what = 4; |
| 74 | |
| 75 | repeated DimensionsValue dimension_leaf_values_in_condition = 5; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 76 | } |
| 77 | |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 78 | message DurationBucketInfo { |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 79 | optional int64 start_bucket_elapsed_nanos = 1; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 80 | |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 81 | optional int64 end_bucket_elapsed_nanos = 2; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 82 | |
| 83 | optional int64 duration_nanos = 3; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 84 | |
| 85 | optional int64 bucket_num = 4; |
| 86 | |
| 87 | optional int64 start_bucket_elapsed_millis = 5; |
| 88 | |
| 89 | optional int64 end_bucket_elapsed_millis = 6; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 90 | } |
| 91 | |
| 92 | message DurationMetricData { |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 93 | optional DimensionsValue dimensions_in_what = 1; |
| 94 | |
Yangster-mac | 16fc72f | 2018-01-18 13:18:01 -0800 | [diff] [blame] | 95 | optional DimensionsValue dimensions_in_condition = 2; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 96 | |
Yangster-mac | 16fc72f | 2018-01-18 13:18:01 -0800 | [diff] [blame] | 97 | repeated DurationBucketInfo bucket_info = 3; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 98 | |
| 99 | repeated DimensionsValue dimension_leaf_values_in_what = 4; |
| 100 | |
| 101 | repeated DimensionsValue dimension_leaf_values_in_condition = 5; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 102 | } |
| 103 | |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 104 | message ValueBucketInfo { |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 105 | optional int64 start_bucket_elapsed_nanos = 1; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 106 | |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 107 | optional int64 end_bucket_elapsed_nanos = 2; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 108 | |
Chenjie Yu | c3f0077 | 2018-07-26 13:50:58 -0700 | [diff] [blame] | 109 | optional int64 value = 3 [deprecated = true]; |
Chenjie Yu | a0f0224 | 2018-07-06 16:14:34 -0700 | [diff] [blame] | 110 | |
Chenjie Yu | 32717c3 | 2018-10-20 23:54:48 -0700 | [diff] [blame^] | 111 | oneof single_value { |
| 112 | int64 value_long = 7 [deprecated = true]; |
Chenjie Yu | c3f0077 | 2018-07-26 13:50:58 -0700 | [diff] [blame] | 113 | |
Chenjie Yu | 32717c3 | 2018-10-20 23:54:48 -0700 | [diff] [blame^] | 114 | double value_double = 8 [deprecated = true]; |
Chenjie Yu | a0f0224 | 2018-07-06 16:14:34 -0700 | [diff] [blame] | 115 | } |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 116 | |
Chenjie Yu | 32717c3 | 2018-10-20 23:54:48 -0700 | [diff] [blame^] | 117 | message Value { |
| 118 | optional int32 index = 1; |
| 119 | oneof value { |
| 120 | int64 value_long = 2; |
| 121 | double value_double = 3; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | repeated Value values = 9; |
| 126 | |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 127 | optional int64 bucket_num = 4; |
| 128 | |
| 129 | optional int64 start_bucket_elapsed_millis = 5; |
| 130 | |
| 131 | optional int64 end_bucket_elapsed_millis = 6; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | message ValueMetricData { |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 135 | optional DimensionsValue dimensions_in_what = 1; |
| 136 | |
Yangster-mac | 16fc72f | 2018-01-18 13:18:01 -0800 | [diff] [blame] | 137 | optional DimensionsValue dimensions_in_condition = 2; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 138 | |
Yangster-mac | 16fc72f | 2018-01-18 13:18:01 -0800 | [diff] [blame] | 139 | repeated ValueBucketInfo bucket_info = 3; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 140 | |
| 141 | repeated DimensionsValue dimension_leaf_values_in_what = 4; |
| 142 | |
| 143 | repeated DimensionsValue dimension_leaf_values_in_condition = 5; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 144 | } |
| 145 | |
| 146 | message GaugeBucketInfo { |
Yangster-mac | 15f6bbc | 2018-04-08 11:52:26 -0700 | [diff] [blame] | 147 | optional int64 start_bucket_elapsed_nanos = 1; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 148 | |
Yangster-mac | 15f6bbc | 2018-04-08 11:52:26 -0700 | [diff] [blame] | 149 | optional int64 end_bucket_elapsed_nanos = 2; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 150 | |
Yangster-mac | 34ea110 | 2018-01-29 12:40:55 -0800 | [diff] [blame] | 151 | repeated Atom atom = 3; |
| 152 | |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 153 | repeated int64 elapsed_timestamp_nanos = 4; |
Yangster-mac | 3fa5d7f | 2018-03-10 21:50:27 -0800 | [diff] [blame] | 154 | |
Bookatz | fe2dde8 | 2018-08-28 13:24:40 -0700 | [diff] [blame] | 155 | repeated int64 wall_clock_timestamp_nanos = 5 [deprecated = true]; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 156 | |
| 157 | optional int64 bucket_num = 6; |
| 158 | |
| 159 | optional int64 start_bucket_elapsed_millis = 7; |
| 160 | |
| 161 | optional int64 end_bucket_elapsed_millis = 8; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 162 | } |
| 163 | |
| 164 | message GaugeMetricData { |
Yangster-mac | 468ff04 | 2018-01-17 12:26:34 -0800 | [diff] [blame] | 165 | optional DimensionsValue dimensions_in_what = 1; |
| 166 | |
Yangster-mac | 16fc72f | 2018-01-18 13:18:01 -0800 | [diff] [blame] | 167 | optional DimensionsValue dimensions_in_condition = 2; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 168 | |
Yangster-mac | 16fc72f | 2018-01-18 13:18:01 -0800 | [diff] [blame] | 169 | repeated GaugeBucketInfo bucket_info = 3; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 170 | |
| 171 | repeated DimensionsValue dimension_leaf_values_in_what = 4; |
| 172 | |
| 173 | repeated DimensionsValue dimension_leaf_values_in_condition = 5; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 174 | } |
| 175 | |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 176 | message StatsLogReport { |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 177 | optional int64 metric_id = 1; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 178 | |
David Chen | 1604957 | 2018-02-01 18:27:51 -0800 | [diff] [blame] | 179 | // Fields 2 and 3 are reserved. |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 180 | |
David Chen | 81245fd | 2018-04-12 14:33:37 -0700 | [diff] [blame] | 181 | message SkippedBuckets { |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 182 | optional int64 start_bucket_elapsed_nanos = 1; |
| 183 | optional int64 end_bucket_elapsed_nanos = 2; |
| 184 | optional int64 start_bucket_elapsed_millis = 3; |
| 185 | optional int64 end_bucket_elapsed_millis = 4; |
David Chen | 81245fd | 2018-04-12 14:33:37 -0700 | [diff] [blame] | 186 | } |
| 187 | |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 188 | message EventMetricDataWrapper { |
| 189 | repeated EventMetricData data = 1; |
| 190 | } |
| 191 | message CountMetricDataWrapper { |
| 192 | repeated CountMetricData data = 1; |
| 193 | } |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 194 | message DurationMetricDataWrapper { |
Yao Chen | 729093d | 2017-10-16 10:33:26 -0700 | [diff] [blame] | 195 | repeated DurationMetricData data = 1; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 196 | } |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 197 | message ValueMetricDataWrapper { |
| 198 | repeated ValueMetricData data = 1; |
David Chen | 81245fd | 2018-04-12 14:33:37 -0700 | [diff] [blame] | 199 | repeated SkippedBuckets skipped = 2; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 200 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 201 | |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 202 | message GaugeMetricDataWrapper { |
| 203 | repeated GaugeMetricData data = 1; |
David Chen | 81245fd | 2018-04-12 14:33:37 -0700 | [diff] [blame] | 204 | repeated SkippedBuckets skipped = 2; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 205 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 206 | |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 207 | oneof data { |
| 208 | EventMetricDataWrapper event_metrics = 4; |
| 209 | CountMetricDataWrapper count_metrics = 5; |
Yao Chen | caf339d | 2017-10-06 16:01:10 -0700 | [diff] [blame] | 210 | DurationMetricDataWrapper duration_metrics = 6; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 211 | ValueMetricDataWrapper value_metrics = 7; |
| 212 | GaugeMetricDataWrapper gauge_metrics = 8; |
yro | 00698da | 2017-09-15 10:06:40 -0700 | [diff] [blame] | 213 | } |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 214 | |
| 215 | optional int64 time_base_elapsed_nano_seconds = 9; |
| 216 | |
| 217 | optional int64 bucket_size_nano_seconds = 10; |
| 218 | |
| 219 | optional DimensionsValue dimensions_path_in_what = 11; |
| 220 | |
| 221 | optional DimensionsValue dimensions_path_in_condition = 12; |
Yao Chen | ab273e2 | 2017-09-06 12:53:50 -0700 | [diff] [blame] | 222 | } |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 223 | |
David Chen | f384b90 | 2018-03-14 18:36:45 -0700 | [diff] [blame] | 224 | message UidMapping { |
| 225 | message PackageInfoSnapshot { |
| 226 | message PackageInfo { |
| 227 | optional string name = 1; |
| 228 | |
| 229 | optional int64 version = 2; |
| 230 | |
| 231 | optional int32 uid = 3; |
David Chen | bd12527 | 2018-04-04 19:02:50 -0700 | [diff] [blame] | 232 | |
| 233 | optional bool deleted = 4; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 234 | |
| 235 | optional uint64 name_hash = 5; |
David Chen | f384b90 | 2018-03-14 18:36:45 -0700 | [diff] [blame] | 236 | } |
| 237 | optional int64 elapsed_timestamp_nanos = 1; |
| 238 | |
| 239 | repeated PackageInfo package_info = 2; |
| 240 | } |
| 241 | repeated PackageInfoSnapshot snapshots = 1; |
| 242 | |
| 243 | message Change { |
| 244 | optional bool deletion = 1; |
| 245 | |
| 246 | optional int64 elapsed_timestamp_nanos = 2; |
| 247 | optional string app = 3; |
| 248 | optional int32 uid = 4; |
| 249 | |
David Chen | bd12527 | 2018-04-04 19:02:50 -0700 | [diff] [blame] | 250 | optional int64 new_version = 5; |
| 251 | optional int64 prev_version = 6; |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 252 | optional uint64 app_hash = 7; |
David Chen | f384b90 | 2018-03-14 18:36:45 -0700 | [diff] [blame] | 253 | } |
| 254 | repeated Change changes = 2; |
| 255 | } |
| 256 | |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 257 | message ConfigMetricsReport { |
yro | 947fbce | 2017-11-15 22:50:23 -0800 | [diff] [blame] | 258 | repeated StatsLogReport metrics = 1; |
| 259 | |
| 260 | optional UidMapping uid_map = 2; |
David Chen | 1604957 | 2018-02-01 18:27:51 -0800 | [diff] [blame] | 261 | |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 262 | optional int64 last_report_elapsed_nanos = 3; |
David Chen | 1604957 | 2018-02-01 18:27:51 -0800 | [diff] [blame] | 263 | |
Yangster-mac | 330af58 | 2018-02-08 15:24:38 -0800 | [diff] [blame] | 264 | optional int64 current_report_elapsed_nanos = 4; |
Yangster-mac | 3fa5d7f | 2018-03-10 21:50:27 -0800 | [diff] [blame] | 265 | |
| 266 | optional int64 last_report_wall_clock_nanos = 5; |
| 267 | |
| 268 | optional int64 current_report_wall_clock_nanos = 6; |
David Chen | faa1af5 | 2018-03-30 15:14:04 -0700 | [diff] [blame] | 269 | |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 270 | message Annotation { |
| 271 | optional int64 field_int64 = 1; |
| 272 | optional int32 field_int32 = 2; |
| 273 | } |
| 274 | repeated Annotation annotation = 7; |
| 275 | |
Chenjie Yu | e36018b | 2018-04-16 15:18:30 -0700 | [diff] [blame] | 276 | enum DumpReportReason { |
| 277 | DEVICE_SHUTDOWN = 1; |
| 278 | CONFIG_UPDATED = 2; |
| 279 | CONFIG_REMOVED = 3; |
| 280 | GET_DATA_CALLED = 4; |
| 281 | ADB_DUMP = 5; |
| 282 | CONFIG_RESET = 6; |
| 283 | STATSCOMPANION_DIED = 7; |
Yangster-mac | 97e7d20 | 2018-10-09 11:05:39 -0700 | [diff] [blame] | 284 | TERMINATION_SIGNAL_RECEIVED = 8; |
Chenjie Yu | e36018b | 2018-04-16 15:18:30 -0700 | [diff] [blame] | 285 | } |
| 286 | optional DumpReportReason dump_report_reason = 8; |
| 287 | |
Yangster-mac | 9def8e3 | 2018-04-17 13:55:51 -0700 | [diff] [blame] | 288 | repeated string strings = 9; |
yro | 947fbce | 2017-11-15 22:50:23 -0800 | [diff] [blame] | 289 | } |
| 290 | |
| 291 | message ConfigMetricsReportList { |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 292 | message ConfigKey { |
| 293 | optional int32 uid = 1; |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 294 | optional int64 id = 2; |
Yangster | fa28aec | 2017-10-30 10:29:52 -0700 | [diff] [blame] | 295 | } |
| 296 | optional ConfigKey config_key = 1; |
| 297 | |
yro | 947fbce | 2017-11-15 22:50:23 -0800 | [diff] [blame] | 298 | repeated ConfigMetricsReport reports = 2; |
Chenjie Yu | e36018b | 2018-04-16 15:18:30 -0700 | [diff] [blame] | 299 | |
| 300 | reserved 10; |
Yangster-mac | 932ecec | 2018-02-01 10:23:52 -0800 | [diff] [blame] | 301 | } |
Yao Chen | 20e9e62 | 2018-02-28 11:18:51 -0800 | [diff] [blame] | 302 | |
| 303 | message StatsdStatsReport { |
| 304 | optional int32 stats_begin_time_sec = 1; |
| 305 | |
| 306 | optional int32 stats_end_time_sec = 2; |
| 307 | |
| 308 | message MatcherStats { |
| 309 | optional int64 id = 1; |
| 310 | optional int32 matched_times = 2; |
| 311 | } |
| 312 | |
| 313 | message ConditionStats { |
| 314 | optional int64 id = 1; |
| 315 | optional int32 max_tuple_counts = 2; |
| 316 | } |
| 317 | |
| 318 | message MetricStats { |
| 319 | optional int64 id = 1; |
| 320 | optional int32 max_tuple_counts = 2; |
| 321 | } |
| 322 | |
| 323 | message AlertStats { |
| 324 | optional int64 id = 1; |
| 325 | optional int32 alerted_times = 2; |
| 326 | } |
| 327 | |
| 328 | message ConfigStats { |
| 329 | optional int32 uid = 1; |
| 330 | optional int64 id = 2; |
| 331 | optional int32 creation_time_sec = 3; |
| 332 | optional int32 deletion_time_sec = 4; |
Yangster-mac | b142cc8 | 2018-03-30 15:22:08 -0700 | [diff] [blame] | 333 | optional int32 reset_time_sec = 19; |
Yao Chen | 20e9e62 | 2018-02-28 11:18:51 -0800 | [diff] [blame] | 334 | optional int32 metric_count = 5; |
| 335 | optional int32 condition_count = 6; |
| 336 | optional int32 matcher_count = 7; |
| 337 | optional int32 alert_count = 8; |
| 338 | optional bool is_valid = 9; |
Yao Chen | 20e9e62 | 2018-02-28 11:18:51 -0800 | [diff] [blame] | 339 | repeated int32 broadcast_sent_time_sec = 10; |
| 340 | repeated int32 data_drop_time_sec = 11; |
Chenjie Yu | c3c30c0 | 2018-10-26 09:48:07 -0700 | [diff] [blame] | 341 | repeated int64 data_drop_bytes = 21; |
Yao Chen | 20e9e62 | 2018-02-28 11:18:51 -0800 | [diff] [blame] | 342 | repeated int32 dump_report_time_sec = 12; |
Yangster-mac | e68f3a5 | 2018-04-04 00:01:43 -0700 | [diff] [blame] | 343 | repeated int32 dump_report_data_size = 20; |
Yao Chen | 20e9e62 | 2018-02-28 11:18:51 -0800 | [diff] [blame] | 344 | repeated MatcherStats matcher_stats = 13; |
| 345 | repeated ConditionStats condition_stats = 14; |
| 346 | repeated MetricStats metric_stats = 15; |
| 347 | repeated AlertStats alert_stats = 16; |
Yangster-mac | 306ccc2 | 2018-03-24 15:03:40 -0700 | [diff] [blame] | 348 | repeated MetricStats metric_dimension_in_condition_stats = 17; |
David Chen | faa1af5 | 2018-03-30 15:14:04 -0700 | [diff] [blame] | 349 | message Annotation { |
| 350 | optional int64 field_int64 = 1; |
| 351 | optional int32 field_int32 = 2; |
| 352 | } |
| 353 | repeated Annotation annotation = 18; |
Yao Chen | 20e9e62 | 2018-02-28 11:18:51 -0800 | [diff] [blame] | 354 | } |
| 355 | |
| 356 | repeated ConfigStats config_stats = 3; |
| 357 | |
| 358 | message AtomStats { |
| 359 | optional int32 tag = 1; |
| 360 | optional int32 count = 2; |
| 361 | } |
| 362 | |
| 363 | repeated AtomStats atom_stats = 7; |
| 364 | |
| 365 | message UidMapStats { |
David Chen | bd12527 | 2018-04-04 19:02:50 -0700 | [diff] [blame] | 366 | optional int32 changes = 1; |
| 367 | optional int32 bytes_used = 2; |
| 368 | optional int32 dropped_changes = 3; |
| 369 | optional int32 deleted_apps = 4; |
Yao Chen | 20e9e62 | 2018-02-28 11:18:51 -0800 | [diff] [blame] | 370 | } |
| 371 | optional UidMapStats uidmap_stats = 8; |
| 372 | |
| 373 | message AnomalyAlarmStats { |
| 374 | optional int32 alarms_registered = 1; |
| 375 | } |
| 376 | optional AnomalyAlarmStats anomaly_alarm_stats = 9; |
| 377 | |
| 378 | message PulledAtomStats { |
| 379 | optional int32 atom_id = 1; |
| 380 | optional int64 total_pull = 2; |
| 381 | optional int64 total_pull_from_cache = 3; |
| 382 | optional int64 min_pull_interval_sec = 4; |
Chenjie Yu | 48ed1cc | 2018-10-31 17:36:38 -0700 | [diff] [blame] | 383 | optional int64 average_pull_time_nanos = 5; |
| 384 | optional int64 max_pull_time_nanos = 6; |
| 385 | optional int64 average_pull_delay_nanos = 7; |
| 386 | optional int64 max_pull_delay_nanos = 8; |
Chenjie Yu | c715b9e | 2018-10-19 07:52:12 -0700 | [diff] [blame] | 387 | optional int64 data_error = 9; |
Yao Chen | 20e9e62 | 2018-02-28 11:18:51 -0800 | [diff] [blame] | 388 | } |
| 389 | repeated PulledAtomStats pulled_atom_stats = 10; |
| 390 | |
| 391 | message LoggerErrorStats { |
| 392 | optional int32 logger_disconnection_sec = 1; |
| 393 | optional int32 error_code = 2; |
| 394 | } |
| 395 | repeated LoggerErrorStats logger_error_stats = 11; |
Yangster-mac | b8382a1 | 2018-04-04 10:39:12 -0700 | [diff] [blame] | 396 | |
| 397 | message PeriodicAlarmStats { |
| 398 | optional int32 alarms_registered = 1; |
| 399 | } |
| 400 | optional PeriodicAlarmStats periodic_alarm_stats = 12; |
| 401 | |
| 402 | message SkippedLogEventStats { |
| 403 | optional int32 tag = 1; |
| 404 | optional int64 elapsed_timestamp_nanos = 2; |
| 405 | } |
| 406 | repeated SkippedLogEventStats skipped_log_event_stats = 13; |
Yao Chen | 163d260 | 2018-04-10 10:39:53 -0700 | [diff] [blame] | 407 | |
| 408 | repeated int64 log_loss_stats = 14; |
Yangster-mac | 892f3d3 | 2018-05-02 14:16:48 -0700 | [diff] [blame] | 409 | |
| 410 | repeated int32 system_restart_sec = 15; |
Yao Chen | 39b6799 | 2018-11-08 15:32:17 -0800 | [diff] [blame] | 411 | |
| 412 | message LogLossStats { |
| 413 | optional int32 detected_time_sec = 1; |
| 414 | optional int32 count = 2; |
| 415 | optional int32 last_error = 3; |
| 416 | } |
| 417 | repeated LogLossStats detected_log_loss = 16; |
Yao Chen | 20e9e62 | 2018-02-28 11:18:51 -0800 | [diff] [blame] | 418 | } |