commit | f4da50937e1798a932b2e6e8bcab15cdf6fa4a93 | [log] [tgz] |
---|---|---|
author | Deepanjan Roy <dproy@google.com> | Wed Jul 15 17:59:04 2020 -0400 |
committer | Deepanjan Roy <dproy@google.com> | Wed Jul 15 17:59:04 2020 -0400 |
tree | b5c1e09b82a539a22b0595c6ff21426dd743f0d6 | |
parent | ddc86ef759d8e5f1c46324aab820427a4a9e444d [diff] |
metrics: Allow chrome metric protos to be compiled in After this CL, we can add chrome metric protos to the metrics/chrome directory. As an example, console error metric is checked in. Previously, TraceMetrics and all its imports were being compiled to protozero because it was part of ComputeMetricResult in trace_processor.proto. However, we do not use the generated protozero files anywhere, and it was preventing us from including the chrome metrics because protozero struggled to process custom options. The type of ComputeMetricResult.metrics has now been changed from TraceMetrics to Bytes, so we do not have to generate any protozero code for metrics. The UI can easily decode those bytes into TraceMetrics proto if it has a TraceMetrics decoder. All the chrome metrics will be listed in metrics/chrome/all_chrome_metrics.proto. This file lists them as extensions to TraceMetrics. We use metric extensions instead of directly including them in TraceMetrics because it will make it simpler to copy the metrics directly from chromium repo to perfetto in the future. To prevent classes, we reserved extension range 1001 to 2000 for chrome metrics in metrics.proto so there is no surprise clash. Since we import custom_options.proto in all_chrome_metrics.proto, we no longer need to generate binary descriptors for it separately. Bug: 155480437 Change-Id: I5aba18984e272c0768830e619d158bf9fd11f9cc
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.