aboutsummaryrefslogtreecommitdiff
path: root/cast/cast_core/api/metrics/metrics_recorder.proto
blob: d7a04950a7f63e14895100ac24d4cd1ec42dc575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// **** DO NOT EDIT - this .proto was automatically generated. ****
syntax = "proto3";

package cast.metrics;

import "google/protobuf/empty.proto";

option optimize_for = LITE_RUNTIME;

service MetricsRecorderService {
  // Record a set of|Event|
  rpc Record(RecordRequest) returns (google.protobuf.Empty);
}

message RecordRequest {
  repeated Event event = 1;
}

// This repliciates the Fuchsia approach to Cast metrics; for documentation on
// event structure, refer to
// fuchsia.googlesource.com/fuchsia/+/master/sdk/fidl/fuchsia.legacymetrics/event.fidl
message Event {
  oneof event_type {
    UserActionEvent user_action_event = 1;
    Histogram histogram = 2;
    ImplementationDefinedEvent impl_defined_event = 3;
  }
}

message UserActionEvent {
  string name = 1;
  optional int64 time = 2;
}

message Histogram {
  string name = 1;
  repeated HistogramBucket bucket = 2;
  int64 sum = 3;
}

message HistogramBucket {
  int64 min = 1;
  int64 max = 2;
  int64 count = 3;
}

message ImplementationDefinedEvent {
  bytes data = 1;
  optional string name = 2;
}