blob: a8e6baa7a6d6b5f2d32b08e5496a49a70414990b [file] [log] [blame]
// Copyright 2020 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.
syntax = "proto3";
package org.chromium.android_webview.proto;
option optimize_for = LITE_RUNTIME; // TODO(crbug/800281): Remove this after proto 4.0
option java_package = "org.chromium.android_webview.proto";
// WebView uses HistogramRecord to serialize a histogram record that
// MetricsBridgeService receives to a file and retrieve it back. These
// histogram records are recorded in non-embedded WebView processes.
//
// Next tag: 7
message HistogramRecord {
// Next tag: 4
enum RecordType {
HISTOGRAM_BOOLEAN = 0;
HISTOGRAM_EXPONENTIAL = 1;
HISTOGRAM_LINEAR = 2;
HISTOGRAM_SPARSE = 3;
}
RecordType record_type = 1;
// The name of the histogram
string histogram_name = 2;
// The sample to be recorded, for HISTOGRAM_BOOLEAN it's either 0 for false
// and 1 for true.
int32 sample = 3;
// The following fields are only used by HISTOGRAM_EXPONENTIAL and
// HISTOGRAM_LINEAR See the docs for
// org.chromium.base.metrics.UmaRecorder#recordExponentialHistogram
// and recordLinearHistogram for more info on these fields.
// the smallest value recorded in the first bucket; should be greater than
// zero.
int32 min = 4;
// the smallest value recorded in the overflow bucket.
int32 max = 5;
// number of histogram buckets: Two buckets are used for underflow and
// overflow, and the remaining buckets cover the range [min, max);
// numBuckets should be 100 or less.
int32 num_buckets = 6;
}