blob: 7e3bcf53044f89647b5f1d2bc5104c2f2b30457d [file] [log] [blame]
John W. Bruce33ecc4f2017-04-03 16:49:05 -07001/*
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
17syntax = "proto2";
18
19package android.drm_metrics;
20
21// need this if we are using libprotobuf-cpp-2.3.0-lite
22option optimize_for = LITE_RUNTIME;
23
24// The MetricsGroup is a collection of metric name/value pair instances
25// that can be serialized and provided to a caller.
26message MetricsGroup {
27 message Metric {
28 message MetricValue {
29 // Exactly one of the following values must be set.
30 optional int64 int_value = 1;
31 optional double double_value = 2;
32 optional string string_value = 3;
33 }
34
35 // The name of the metric. Must be valid UTF-8. Required.
36 optional string name = 1;
37
38 // The value of the metric. Required.
39 optional MetricValue value = 2;
40 }
41
42 // The list of name/value pairs of metrics.
43 repeated Metric metric = 1;
44
45 // Allow multiple sub groups of metrics.
46 repeated MetricsGroup metric_sub_group = 2;
Adam Stone21c72122017-09-05 19:02:06 -070047
48 // Name of the application package associated with the metrics.
49 optional string app_package_name = 3;
John W. Bruce33ecc4f2017-04-03 16:49:05 -070050}