xref: /aosp_15_r20/external/cronet/third_party/metrics_proto/trace_log.proto (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1// Copyright 2019 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
10option java_outer_classname = "TraceLogProtos";
11
12package metrics;
13
14// The trace data is collected by Chrome tracing infrastructure to obtain a
15// timeline model of events occurring in all Chrome processes and threads.
16// Chrome uploads data as a serialized perfetto trace message. The proto format
17// is defined in perfetto tracing library in
18// //src/third_party/perfetto/protos/perfetto/trace/trace.proto
19
20// Wrapper for the uploaded trace data, and parsed trace as stored in the logs.
21// Next ID: 6
22message TraceLog {
23  // Client uploads the trace data as a byte buffer.
24  optional bytes raw_data = 1;
25
26  reserved 3;
27
28  enum CompressionType {
29    COMPRESSION_TYPE_NONE = 0;
30    COMPRESSION_TYPE_ZLIB = 1;
31  }
32
33  // Some clients compress trace data before upload.
34  // If this field has a value other than COMPRESSION_TYPE_NONE, |raw_data|
35  // will contain the compressed trace.
36  optional CompressionType compression_type = 5
37      [default = COMPRESSION_TYPE_NONE];
38}
39