• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2017 The Chromium Authors
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
10package ukm;
11
12// Next tag: 10
13message Aggregate {
14  // The id of the Source this Event is associated with. If this is zero
15  // then it's an aggregate across all sources.
16  optional int64 source_id = 1;
17
18  // Type of the Event. This is a hash of the name (as a string).
19  optional fixed64 event_hash = 2;
20
21  // The total number of times this source/event was observed.
22  optional uint64 total_count = 3;
23
24  // The total number of times this source/event was dropped due to limits.
25  optional uint64 dropped_due_to_limits = 4;
26
27  // The total number of times this source/event was dropped due to sampling.
28  optional uint64 dropped_due_to_sampling = 5;
29
30  // The total number of times this source/event was dropped due to filter.
31  // Unlike the others, records dropped for this reason are not included
32  // in the |total_count|.
33  // https://source.chromium.org/chromium/chromium/src/+/main:components/ukm/ukm_entry_filter.h
34  optional uint64 dropped_due_to_filter = 8;
35
36  // The total number of times this source/event was dropped due to there
37  // being no configuration of UKM via Finch. Until a full configuration is
38  // delivered by Finch to the client, UKM is disabled but some basic
39  // information is still collected and counted here.
40  optional uint64 dropped_due_to_unconfigured = 9;
41
42  // For each Event, we have a list of possible metrics included. Metric names
43  // cannot be repeated. There is no guarantee that all metrics that are
44  // possible for a given event will be included in a single Aggregate.
45  message Metric {
46    // The hash of the metric's name.
47    optional fixed64 metric_hash = 1;
48
49    // The sum of all the values seen for this metric.
50    optional double value_sum = 2;
51
52    // The sum of all the squared-values seen for this metric.
53    optional double value_square_sum = 3;
54
55    // Overrides of values given above if different for this specific metric.
56    optional uint64 total_count = 4;
57    optional uint64 dropped_due_to_limits = 5;
58    optional uint64 dropped_due_to_sampling = 6;
59    optional uint64 dropped_due_to_filter = 8;
60    optional uint64 dropped_due_to_unconfigured = 9;
61  }
62  repeated Metric metrics = 6;
63}
64