metrics_bridge_records.proto 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Copyright 2020 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. syntax = "proto3";
  5. package org.chromium.android_webview.proto;
  6. option optimize_for = LITE_RUNTIME; // TODO(crbug/800281): Remove this after proto 4.0
  7. option java_package = "org.chromium.android_webview.proto";
  8. // WebView uses HistogramRecord to serialize a histogram record that
  9. // MetricsBridgeService receives to a file and retrieve it back. These
  10. // histogram records are recorded in non-embedded WebView processes.
  11. //
  12. // Next tag: 9
  13. message HistogramRecord {
  14. // Next tag: 5
  15. enum RecordType {
  16. HISTOGRAM_BOOLEAN = 0;
  17. HISTOGRAM_EXPONENTIAL = 1;
  18. HISTOGRAM_LINEAR = 2;
  19. HISTOGRAM_SPARSE = 3;
  20. USER_ACTION = 4;
  21. }
  22. RecordType record_type = 1;
  23. // The name of the histogram
  24. string histogram_name = 2;
  25. // The sample to be recorded, for HISTOGRAM_BOOLEAN it's either 0 for false
  26. // and 1 for true.
  27. int32 sample = 3;
  28. // The following fields are only used by HISTOGRAM_EXPONENTIAL and
  29. // HISTOGRAM_LINEAR See the docs for
  30. // org.chromium.base.metrics.UmaRecorder#recordExponentialHistogram
  31. // and recordLinearHistogram for more info on these fields.
  32. // the smallest value recorded in the first bucket; should be greater than
  33. // zero.
  34. int32 min = 4;
  35. // the smallest value recorded in the overflow bucket.
  36. int32 max = 5;
  37. // number of histogram buckets: Two buckets are used for underflow and
  38. // overflow, and the remaining buckets cover the range [min, max);
  39. // numBuckets should be 100 or less.
  40. int32 num_buckets = 6;
  41. // Metadata for the histogram record.
  42. // Next tag: 2
  43. message Metadata {
  44. // The time in millis when the histogram is received by the
  45. // AwNonEmbeddedUmaRecorder
  46. int64 time_recorded = 1;
  47. }
  48. Metadata metadata = 7;
  49. // Used for |record_type| == USER_ACTION only.
  50. int64 elapsed_realtime_millis = 8;
  51. }