Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Side by Side Diff: components/metrics/proto/histogram_event.proto

Issue 1744283002: Optimizations to histogram protobuf encoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/metrics/histogram_encoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Histogram-collected metrics. 5 // Histogram-collected metrics.
6 6
7 syntax = "proto2"; 7 syntax = "proto2";
8 8
9 option optimize_for = LITE_RUNTIME; 9 option optimize_for = LITE_RUNTIME;
10 option java_outer_classname = "HistogramEventProtos"; 10 option java_outer_classname = "HistogramEventProtos";
11 option java_package = "org.chromium.components.metrics"; 11 option java_package = "org.chromium.components.metrics";
12 12
13 package metrics; 13 package metrics;
14 14
15 // Next tag: 4 15 // Next tag: 4
16 message HistogramEventProto { 16 message HistogramEventProto {
17 // The name of the histogram, hashed. 17 // The name of the histogram, hashed.
18 optional fixed64 name_hash = 1; 18 optional fixed64 name_hash = 1;
19 19
20 // The sum of all the sample values. 20 // The sum of all the sample values.
21 // Together with the total count of the sample values, this allows us to 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 22 // compute the average value. The count of all sample values is just the sum
23 // of the counts of all the buckets. 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.
24 optional int64 sum = 2; 25 optional int64 sum = 2;
25 26
26 // The per-bucket data. 27 // The per-bucket data.
27 message Bucket { 28 message Bucket {
28 // Each bucket's range is bounded by min <= x < max. 29 // Each bucket's range is bounded by min <= x < max.
29 // It is valid to omit one of these two fields in a bucket, but not both. 30 // It is valid to omit one of these two fields in a bucket, but not both.
30 // If the min field is omitted, its value is assumed to be equal to max - 1. 31 // If the min field is omitted, its value is assumed to be equal to max - 1.
31 // If the max field is omitted, its value is assumed to be equal to the next 32 // If the max field is omitted, its value is assumed to be equal to the next
32 // bucket's min value (possibly computed per above). The last bucket in a 33 // bucket's min value (possibly computed per above). The last bucket in a
33 // histogram should always include the max field. 34 // histogram should always include the max field.
34 optional int64 min = 1; 35 optional int64 min = 1;
35 optional int64 max = 2; 36 optional int64 max = 2;
36 37
37 // The bucket's index in the list of buckets, sorted in ascending order. 38 // The bucket's index in the list of buckets, sorted in ascending order.
38 // This field was intended to provide extra redundancy to detect corrupted 39 // This field was intended to provide extra redundancy to detect corrupted
39 // records, but was never used. As of M31, it is no longer sent by Chrome 40 // records, but was never used. As of M31, it is no longer sent by Chrome
40 // clients to reduce the UMA upload size. 41 // clients to reduce the UMA upload size.
41 optional int32 bucket_index = 3 [deprecated = true]; 42 optional int32 bucket_index = 3 [deprecated = true];
42 43
43 // The number of entries in this bucket. 44 // The number of entries in this bucket. As of M51, when the value of this
44 optional int64 count = 4; 45 // field would be 1, the field will be omitted instead.
46 optional int64 count = 4 [default = 1];
45 } 47 }
46 repeated Bucket bucket = 3; 48 repeated Bucket bucket = 3;
47 } 49 }
OLDNEW
« no previous file with comments | « components/metrics/histogram_encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698