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.drm_metrics; 20 21 // need this if we are using libprotobuf-cpp-2.3.0-lite 22 option 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. 26 message 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; 47 48 // Name of the application package associated with the metrics. 49 optional string app_package_name = 3; 50 } 51