Yao Chen | 9c1debe | 2018-02-19 14:39:19 -0800 | [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 | */ |
| 16 | |
| 17 | syntax = "proto2"; |
| 18 | |
| 19 | package android.os.statsd; |
| 20 | |
| 21 | option java_package = "com.android.os"; |
| 22 | option java_outer_classname = "StatsLogCommon"; |
| 23 | |
| 24 | message UidMapping { |
| 25 | message PackageInfoSnapshot { |
| 26 | message PackageInfo { |
| 27 | optional string name = 1; |
| 28 | |
| 29 | optional int64 version = 2; |
| 30 | |
| 31 | optional int32 uid = 3; |
| 32 | } |
| 33 | optional int64 elapsed_timestamp_nanos = 1; |
| 34 | |
| 35 | repeated PackageInfo package_info = 2; |
| 36 | } |
| 37 | repeated PackageInfoSnapshot snapshots = 1; |
| 38 | |
| 39 | message Change { |
| 40 | optional bool deletion = 1; |
| 41 | |
| 42 | optional int64 elapsed_timestamp_nanos = 2; |
| 43 | optional string app = 3; |
| 44 | optional int32 uid = 4; |
| 45 | |
| 46 | optional int64 version = 5; |
| 47 | } |
| 48 | repeated Change changes = 2; |
| 49 | } |
| 50 | |
| 51 | message StatsdStatsReport { |
| 52 | optional int32 stats_begin_time_sec = 1; |
| 53 | |
| 54 | optional int32 stats_end_time_sec = 2; |
| 55 | |
| 56 | message MatcherStats { |
| 57 | optional int64 id = 1; |
| 58 | optional int32 matched_times = 2; |
| 59 | } |
| 60 | |
| 61 | message ConditionStats { |
| 62 | optional int64 id = 1; |
| 63 | optional int32 max_tuple_counts = 2; |
| 64 | } |
| 65 | |
| 66 | message MetricStats { |
| 67 | optional int64 id = 1; |
| 68 | optional int32 max_tuple_counts = 2; |
| 69 | } |
| 70 | |
| 71 | message AlertStats { |
| 72 | optional int64 id = 1; |
| 73 | optional int32 alerted_times = 2; |
| 74 | } |
| 75 | |
| 76 | message ConfigStats { |
| 77 | optional int32 uid = 1; |
| 78 | optional int64 id = 2; |
| 79 | optional int32 creation_time_sec = 3; |
| 80 | optional int32 deletion_time_sec = 4; |
| 81 | optional int32 metric_count = 5; |
| 82 | optional int32 condition_count = 6; |
| 83 | optional int32 matcher_count = 7; |
| 84 | optional int32 alert_count = 8; |
| 85 | optional bool is_valid = 9; |
| 86 | |
| 87 | repeated int32 broadcast_sent_time_sec = 10; |
| 88 | repeated int32 data_drop_time_sec = 11; |
| 89 | repeated int32 dump_report_time_sec = 12; |
| 90 | repeated MatcherStats matcher_stats = 13; |
| 91 | repeated ConditionStats condition_stats = 14; |
| 92 | repeated MetricStats metric_stats = 15; |
| 93 | repeated AlertStats alert_stats = 16; |
| 94 | } |
| 95 | |
| 96 | repeated ConfigStats config_stats = 3; |
| 97 | |
| 98 | message AtomStats { |
| 99 | optional int32 tag = 1; |
| 100 | optional int32 count = 2; |
| 101 | } |
| 102 | |
| 103 | repeated AtomStats atom_stats = 7; |
| 104 | |
| 105 | message UidMapStats { |
| 106 | optional int32 snapshots = 1; |
| 107 | optional int32 changes = 2; |
| 108 | optional int32 bytes_used = 3; |
| 109 | optional int32 dropped_snapshots = 4; |
| 110 | optional int32 dropped_changes = 5; |
| 111 | } |
| 112 | optional UidMapStats uidmap_stats = 8; |
| 113 | |
| 114 | message AnomalyAlarmStats { |
| 115 | optional int32 alarms_registered = 1; |
| 116 | } |
| 117 | optional AnomalyAlarmStats anomaly_alarm_stats = 9; |
| 118 | |
| 119 | message PulledAtomStats { |
| 120 | optional int32 atom_id = 1; |
| 121 | optional int64 total_pull = 2; |
| 122 | optional int64 total_pull_from_cache = 3; |
| 123 | optional int64 min_pull_interval_sec = 4; |
| 124 | } |
| 125 | repeated PulledAtomStats pulled_atom_stats = 10; |
| 126 | |
| 127 | message LoggerErrorStats { |
| 128 | optional int32 logger_disconnection_sec = 1; |
| 129 | optional int32 error_code = 2; |
| 130 | } |
| 131 | repeated LoggerErrorStats logger_error_stats = 11; |
| 132 | } |