1// Copyright 2021 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// 5// **** DO NOT EDIT - this file was automatically generated. **** 6syntax = "proto3"; 7 8package cast.metrics; 9 10option optimize_for = LITE_RUNTIME; 11 12service MetricsRecorderService { 13 // Record a set of|Event| 14 rpc Record(RecordRequest) returns (RecordResponse); 15} 16 17message RecordRequest { 18 repeated Event event = 1; 19} 20 21message RecordResponse {} 22 23// This repliciates the Fuchsia approach to Cast metrics; for documentation on 24// event structure, refer to 25// fuchsia.googlesource.com/fuchsia/+/master/sdk/fidl/fuchsia.legacymetrics/event.fidl 26message Event { 27 oneof event_type { 28 UserActionEvent user_action_event = 1; 29 Histogram histogram = 2; 30 ImplementationDefinedEvent impl_defined_event = 3; 31 } 32} 33 34message UserActionEvent { 35 string name = 1; 36 int64 time = 2; 37} 38 39message Histogram { 40 string name = 1; 41 repeated HistogramBucket bucket = 2; 42 int64 sum = 3; 43} 44 45message HistogramBucket { 46 int64 min = 1; 47 int64 max = 2; 48 int64 count = 3; 49} 50 51message ImplementationDefinedEvent { 52 bytes data = 1; 53 string name = 2; 54} 55