• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2021 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// Partial clone packages/modules/StatsD/statsd/src/stats_log.proto. Unused messages are not copied
18// here.
19
20syntax = "proto2";
21
22package android.car.telemetry;
23
24option java_package = "com.android.car.telemetry";
25option java_outer_classname = "StatsLogProto";
26
27import "packages/services/Car/service/proto/android/car/telemetry/atoms.proto";
28
29message DimensionsValueTuple {
30  repeated DimensionsValue dimensions_value = 1;
31}
32
33message DimensionsValue {
34  optional int32 field = 1;
35
36  oneof value {
37    string value_str = 2;
38    int32 value_int = 3;
39    int64 value_long = 4;
40    bool value_bool = 5;
41    float value_float = 6;
42    DimensionsValueTuple value_tuple = 7;
43    uint64 value_str_hash = 8;
44  }
45}
46
47message AggregatedAtomInfo {
48  optional Atom atom = 1;
49  repeated int64 elapsed_timestamp_nanos = 2;
50}
51
52message EventMetricData {
53  optional int64 elapsed_timestamp_nanos = 1;
54  optional Atom atom = 2;
55  optional AggregatedAtomInfo aggregated_atom_info = 4;
56  reserved 3;
57}
58
59message GaugeBucketInfo {
60  repeated Atom atom = 3;
61  repeated int64 elapsed_timestamp_nanos = 4;
62  repeated AggregatedAtomInfo aggregated_atom_info = 9;
63  reserved 1, 2, 5, 6, 7, 8;
64}
65
66message GaugeMetricData {
67  repeated GaugeBucketInfo bucket_info = 3;
68  repeated DimensionsValue dimension_leaf_values_in_what = 4;
69  reserved 1, 2, 5, 6;
70}
71
72message StatsLogReport {
73  optional int64 metric_id = 1;
74
75  message EventMetricDataWrapper {
76    repeated EventMetricData data = 1;
77  }
78
79  message GaugeMetricDataWrapper {
80    repeated GaugeMetricData data = 1;
81    reserved 2;
82  }
83
84  oneof data {
85    EventMetricDataWrapper event_metrics = 4;
86    GaugeMetricDataWrapper gauge_metrics = 8;
87  }
88
89  optional DimensionsValue dimensions_path_in_what = 11;
90
91  optional bool is_active = 14;
92
93  reserved 2, 3, 5, 6, 7, 9, 10, 12, 13, 15, 16;
94}
95
96message ConfigMetricsReport {
97  repeated StatsLogReport metrics = 1;
98
99  repeated string strings = 9;
100
101  reserved 2, 3, 4, 5, 6, 7, 8;
102}
103
104message ConfigMetricsReportList {
105  repeated ConfigMetricsReport reports = 2;
106
107  reserved 1, 10;
108}
109
110message StatsdStatsReport {
111  message ConfigStats {
112    optional int32 uid = 1;
113    optional int64 id = 2;
114    optional bool is_valid = 9;
115  }
116
117  repeated ConfigStats config_stats = 3;
118
119  reserved 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19;
120}
121