1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5syntax = "proto2"; 6 7option optimize_for = LITE_RUNTIME; 8option java_package = "org.chromium.components.metrics"; 9 10option java_outer_classname = "HistogramEventProtos"; 11 12package metrics; 13 14// Histogram-collected metrics. 15// Next tag: 4 16message HistogramEventProto { 17 // The name of the histogram, hashed. 18 optional fixed64 name_hash = 1; 19 20 // The sum of all the sample values. 21 // Together with the total count of the sample values, this allows us to 22 // compute the average value. The count of all sample values is just the sum 23 // of the counts of all the buckets. As of M51, when the value of this field 24 // would be 0, the field will be omitted instead. 25 optional int64 sum = 2; 26 27 // The per-bucket data. 28 // Next tag: 5 29 message Bucket { 30 // Each bucket's range is bounded by min <= x < max. 31 // It is valid to omit one of these two fields in a bucket, but not both. 32 // If the min field is omitted, its value is assumed to be equal to max - 1. 33 // If the max field is omitted, its value is assumed to be equal to the next 34 // bucket's min value (possibly computed per above). The last bucket in a 35 // histogram should always include the max field. 36 optional int64 min = 1; 37 optional int64 max = 2; 38 39 // The number of entries in this bucket. As of M51, when the value of this 40 // field would be 1, the field will be omitted instead. 41 optional int64 count = 4 [default = 1]; 42 } 43 repeated Bucket bucket = 3; 44} 45