Bertrand SIMONNET | 52e5b99 | 2015-08-10 15:18:00 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 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 | */ |
Bertrand SIMONNET | c95440e | 2015-07-16 17:16:51 -0700 | [diff] [blame] | 16 | // |
| 17 | // Histogram-collected metrics. |
| 18 | |
| 19 | syntax = "proto2"; |
| 20 | |
| 21 | option optimize_for = LITE_RUNTIME; |
| 22 | option java_outer_classname = "HistogramEventProtos"; |
| 23 | option java_package = "org.chromium.components.metrics"; |
| 24 | |
| 25 | package metrics; |
| 26 | |
| 27 | // Next tag: 4 |
| 28 | message HistogramEventProto { |
| 29 | // The name of the histogram, hashed. |
| 30 | optional fixed64 name_hash = 1; |
| 31 | |
| 32 | // The sum of all the sample values. |
| 33 | // Together with the total count of the sample values, this allows us to |
| 34 | // compute the average value. The count of all sample values is just the sum |
| 35 | // of the counts of all the buckets. |
| 36 | optional int64 sum = 2; |
| 37 | |
| 38 | // The per-bucket data. |
| 39 | message Bucket { |
| 40 | // Each bucket's range is bounded by min <= x < max. |
| 41 | // It is valid to omit one of these two fields in a bucket, but not both. |
| 42 | // If the min field is omitted, its value is assumed to be equal to max - 1. |
| 43 | // If the max field is omitted, its value is assumed to be equal to the next |
| 44 | // bucket's min value (possibly computed per above). The last bucket in a |
| 45 | // histogram should always include the max field. |
| 46 | optional int64 min = 1; |
| 47 | optional int64 max = 2; |
| 48 | |
| 49 | // The bucket's index in the list of buckets, sorted in ascending order. |
| 50 | // This field was intended to provide extra redundancy to detect corrupted |
| 51 | // records, but was never used. As of M31, it is no longer sent by Chrome |
| 52 | // clients to reduce the UMA upload size. |
| 53 | optional int32 bucket_index = 3 [deprecated = true]; |
| 54 | |
| 55 | // The number of entries in this bucket. |
| 56 | optional int64 count = 4; |
| 57 | } |
| 58 | repeated Bucket bucket = 3; |
| 59 | } |