• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 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
17syntax = "proto2";
18
19package android.express;
20
21option java_package = "com.android.os.express";
22option java_outer_classname = "ExpressConfigProto";
23option java_multiple_files = true;
24
25enum MetricUnit {
26    UNIT_UNKNOWN = 0;
27    UNIT_COUNT = 1;
28    UNIT_TIME_MILLIS = 2;
29    UNIT_KILOBYTE = 3;
30}
31
32enum MetricType {
33    METRIC_TYPE_UNKNOWN = 0;
34    COUNTER = 1;
35    HISTOGRAM = 2;
36    COUNTER_WITH_UID = 3;
37    HISTOGRAM_WITH_UID = 4;
38}
39
40message HistogramOptions {
41
42    message UniformBinningOptions {
43        optional int32 count = 1;
44        optional float min = 2;
45        optional float max = 3;
46    }
47
48    message ScaledBinningOptions  {
49        optional int32 count = 1;
50        optional float min = 2;
51        optional float first_bin_width = 3;
52        optional float scale = 4;
53    }
54
55    oneof options {
56        UniformBinningOptions uniform_bins = 1;
57        ScaledBinningOptions scaled_bins = 2;
58    }
59}
60
61message ExpressMetric {
62    optional string id = 1;
63
64    optional MetricType type = 2;
65
66    optional string display_name = 3;
67
68    optional string description = 4;
69
70    repeated string owner_email = 5;
71
72    optional MetricUnit unit = 6;
73
74    oneof options {
75        HistogramOptions histogram_options = 7;
76    }
77}
78
79message ExpressMetricConfigFile {
80    repeated ExpressMetric express_metric = 1;
81}
82