1// Copyright 2017 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;
8
9package ukm;
10
11// Next tag: 8
12message Aggregate {
13  // The id of the Source this Event is associated with. If this is zero
14  // then it's an aggregate across all sources.
15  optional int64 source_id = 1;
16
17  // Type of the Event. This is a hash of the name (as a string).
18  optional fixed64 event_hash = 2;
19
20  // The total number of times this source/event was observed.
21  optional uint64 total_count = 3;
22
23  // The total number of times this source/event was dropped due to limits.
24  optional uint64 dropped_due_to_limits = 4;
25
26  // The total number of times this source/event was dropped due to sampling.
27  optional uint64 dropped_due_to_sampling = 5;
28
29  // The total number of times this source/event was dropped due to whitelist.
30  optional uint64 dropped_due_to_whitelist = 7;
31
32  // For each Event, we have a list of possible metrics included. Metric names
33  // cannot be repeated. There is no guarentee that all metrics that are
34  // possible for a given event will be included in a single Aggregate.
35  message Metric {
36    // The hash of the metric's name.
37    optional fixed64 metric_hash = 1;
38
39    // The sum of all the values seen for this metric.
40    optional double value_sum = 2;
41
42    // The sum of all the squared-values seen for this metric.
43    optional double value_square_sum = 3;
44
45    // Overrides of values given above if different for this specific metric.
46    optional uint64 total_count = 4;
47    optional uint64 dropped_due_to_limits = 5;
48    optional uint64 dropped_due_to_sampling = 6;
49    optional uint64 dropped_due_to_whitelist = 7;
50  }
51  repeated Metric metrics = 6;
52}
53