aboutsummaryrefslogtreecommitdiff
path: root/protos/perfetto/metrics/metrics.proto
blob: c3025c301f1ed27e28228f6cb8c4d3c72bfaeaa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

syntax = "proto2";

package perfetto.protos;

import "protos/perfetto/metrics/android/ad_services_metric.proto";
import "protos/perfetto/metrics/android/android_boot.proto";
import "protos/perfetto/metrics/android/android_boot_unagg.proto";
import "protos/perfetto/metrics/android/android_garbage_collection_unagg_metric.proto";
import "protos/perfetto/metrics/android/sysui_notif_shade_list_builder_metric.proto";
import "protos/perfetto/metrics/android/sysui_update_notif_on_ui_mode_changed_metric.proto";
import "protos/perfetto/metrics/android/android_frame_timeline_metric.proto";
import "protos/perfetto/metrics/android/anr_metric.proto";
import "protos/perfetto/metrics/android/batt_metric.proto";
import "protos/perfetto/metrics/android/android_sysui_notifications_blocking_calls_metric.proto";
import "protos/perfetto/metrics/android/android_blocking_calls_cuj_metric.proto";
import "protos/perfetto/metrics/android/android_blocking_calls_unagg.proto";
import "protos/perfetto/metrics/android/codec_metrics.proto";
import "protos/perfetto/metrics/android/cpu_metric.proto";
import "protos/perfetto/metrics/android/camera_metric.proto";
import "protos/perfetto/metrics/android/camera_unagg_metric.proto";
import "protos/perfetto/metrics/android/display_metrics.proto";
import "protos/perfetto/metrics/android/dma_heap_metric.proto";
import "protos/perfetto/metrics/android/dvfs_metric.proto";
import "protos/perfetto/metrics/android/fastrpc_metric.proto";
import "protos/perfetto/metrics/android/g2d_metric.proto";
import "protos/perfetto/metrics/android/gpu_metric.proto";
import "protos/perfetto/metrics/android/hwcomposer.proto";
import "protos/perfetto/metrics/android/hwui_metric.proto";
import "protos/perfetto/metrics/android/io_metric.proto";
import "protos/perfetto/metrics/android/io_unagg_metric.proto";
import "protos/perfetto/metrics/android/ion_metric.proto";
import "protos/perfetto/metrics/android/irq_runtime_metric.proto";
import "protos/perfetto/metrics/android/jank_cuj_metric.proto";
import "protos/perfetto/metrics/android/java_heap_histogram.proto";
import "protos/perfetto/metrics/android/java_heap_stats.proto";
import "protos/perfetto/metrics/android/lmk_metric.proto";
import "protos/perfetto/metrics/android/lmk_reason_metric.proto";
import "protos/perfetto/metrics/android/mem_metric.proto";
import "protos/perfetto/metrics/android/mem_unagg_metric.proto";
import "protos/perfetto/metrics/android/multiuser_metric.proto";
import "protos/perfetto/metrics/android/network_metric.proto";
import "protos/perfetto/metrics/android/other_traces.proto";
import "protos/perfetto/metrics/android/package_list.proto";
import "protos/perfetto/metrics/android/powrails_metric.proto";
import "protos/perfetto/metrics/android/profiler_smaps.proto";
import "protos/perfetto/metrics/android/rt_runtime_metric.proto";
import "protos/perfetto/metrics/android/simpleperf.proto";
import "protos/perfetto/metrics/android/startup_metric.proto";
import "protos/perfetto/metrics/android/surfaceflinger.proto";
import "protos/perfetto/metrics/android/task_names.proto";
import "protos/perfetto/metrics/android/trace_quality.proto";
import "protos/perfetto/metrics/android/android_trusty_workqueues.proto";
import "protos/perfetto/metrics/android/unsymbolized_frames.proto";
import "protos/perfetto/metrics/android/binder_metric.proto";
import "protos/perfetto/metrics/android/monitor_contention_metric.proto";
import "protos/perfetto/metrics/android/monitor_contention_agg_metric.proto";
import "protos/perfetto/metrics/android/app_process_starts_metric.proto";
import "protos/perfetto/metrics/android/android_oom_adjuster_metric.proto";

// Trace processor metadata
message TraceMetadata {
  reserved 1;
  optional int64 trace_duration_ns = 2;
  optional string trace_uuid = 3;
  optional string android_build_fingerprint = 4;
  optional int64 statsd_triggering_subscription_id = 5;
  optional int64 trace_size_bytes = 6;
  repeated string trace_trigger = 7;
  optional string unique_session_name = 8;
  optional string trace_config_pbtxt = 9;
  optional int64 sched_duration_ns = 10;
  optional int64 tracing_started_ns = 11;
}

// Stats counters for the trace.
// Defined in src/trace_processor/storage/stats.h
message TraceAnalysisStats {
  enum Severity {
    SEVERITY_UNKNOWN = 0;
    SEVERITY_INFO = 1;
    SEVERITY_DATA_LOSS = 2;
    SEVERITY_ERROR = 3;
  }

  enum Source {
    SOURCE_UNKNOWN = 0;
    SOURCE_TRACE = 1;
    SOURCE_ANALYSIS = 2;
  }

  message Stat {
    optional string name = 1;
    optional uint32 idx = 2;
    optional Severity severity = 3;
    optional Source source = 4;

    optional int64 count = 5;
  }

  repeated Stat stat = 1;
}

// Root message for all Perfetto-based metrics.
//
// Next id: 66
message TraceMetrics {
  reserved 4, 10, 13, 14, 16, 19;

  // Battery counters metric on Android.
  optional AndroidBatteryMetric android_batt = 5;

  // CPU usage per trace, process and thread.
  optional AndroidCpuMetric android_cpu = 6;

  // Memory metrics on Android (owned by the Android Telemetry team).
  optional AndroidMemoryMetric android_mem = 1;

  // Memory metrics on Android in unaggregated form. (owned by the Android
  // Telemetry team).
  // Note: this generates a lot of data so should not be requested unless it
  // is clear that this data is necessary.
  optional AndroidMemoryUnaggregatedMetric android_mem_unagg = 11;

  // Package list.
  optional AndroidPackageList android_package_list = 12;

  // ion buffer memory metrics.
  optional AndroidIonMetric android_ion = 9;

  // fastrpc subsystem memory metrics.
  optional AndroidFastrpcMetric android_fastrpc = 31;

  // Statistics about low memory kills.
  optional AndroidLmkMetric android_lmk = 8;

  // Power Rails metrics on Android.
  optional AndroidPowerRails android_powrails = 7;

  // Startup metrics on Android (owned by the Android Telemetry team).
  optional AndroidStartupMetric android_startup = 2;

  // Trace metadata (applicable to all traces).
  optional TraceMetadata trace_metadata = 3;

  // Trace stats (applicable to all traces).
  optional TraceAnalysisStats trace_stats = 33;

  // Returns stack frames missing symbols.
  optional UnsymbolizedFrames unsymbolized_frames = 15;

  // If the trace contains a heap graph, output allocation statistics.
  optional JavaHeapStats java_heap_stats = 17;

  // If the trace contains a heap graph, output histogram.
  optional JavaHeapHistogram java_heap_histogram = 21;

  // Metrics used to find potential culprits of low-memory kills.
  optional AndroidLmkReasonMetric android_lmk_reason = 18;

  optional AndroidHwuiMetric android_hwui_metric = 20;

  optional AndroidDisplayMetrics display_metrics = 22;

  optional AndroidTaskNames android_task_names = 23;

  // Deprecated was AndroidThreadTimeInStateMetric
  reserved 24;

  // Metric associated with surfaceflinger.
  optional AndroidSurfaceflingerMetric android_surfaceflinger = 25;

  // GPU metrics on Android.
  optional AndroidGpuMetric android_gpu = 26;

  // Deprecated AndroidSysUiCujMetrics.
  reserved 27;

  // Interaction and frame timings for CUJs (important UI transitions).
  optional AndroidJankCujMetric android_jank_cuj = 48;

  // Metric associated with hwcomposer.
  optional AndroidHwcomposerMetrics android_hwcomposer = 28;

  // Deprecated was AndroidJankMetrics;
  reserved 29;

  // G2D metrics.
  optional G2dMetrics g2d = 30;

  // Dmabuf heap metrics.
  optional AndroidDmaHeapMetric android_dma_heap = 32;

  // Metric to verify the quality of the trace.
  optional AndroidTraceQualityMetric android_trace_quality = 34;

  // Profiler smaps
  optional ProfilerSmaps profiler_smaps = 35;

  // Multiuser - metrics for switching users.
  optional AndroidMultiuserMetric android_multiuser = 36;

  // Metrics related to simpleperf tool
  optional AndroidSimpleperfMetric android_simpleperf = 37;

  // Metrics for the Camera team.
  optional AndroidCameraMetric android_camera = 38;

  // Metrics for dynamic voltage and frequency scaling.
  optional AndroidDvfsMetric android_dvfs = 39;

  // Metrics for network performance.
  optional AndroidNetworkMetric android_netperf = 40;

  // Metrics for the Camera team.
  // Note: this generates a lot of data so should not be requested unless it
  // is clear that this data is necessary.
  optional AndroidCameraUnaggregatedMetric android_camera_unagg = 41;

  // Metrics for RT runtime.
  optional AndroidRtRuntimeMetric android_rt_runtime = 42;

  // Metrics for IRQ runtime.
  optional AndroidIrqRuntimeMetric android_irq_runtime = 43;

  // Metrics for the Trusty team.
  optional AndroidTrustyWorkqueues android_trusty_workqueues = 44;

  // Summary of other concurrent trace recording.
  optional AndroidOtherTracesMetric android_other_traces = 45;

  // Per-process Binder transaction metrics.
  optional AndroidBinderMetric android_binder = 46;

  // Metrics for app deadline missed.
  optional AndroidFrameTimelineMetric android_frame_timeline_metric = 47;

  // Blocking calls (e.g. binder calls) for CUJs (important UI transitions).
  optional AndroidBlockingCallsCujMetric android_blocking_calls_cuj_metric = 49;

  optional AndroidMonitorContentionMetric android_monitor_contention = 50;

  optional AndroidSysUINotificationsBlockingCallsMetric android_sysui_notifications_blocking_calls_metric = 51;

  // Metrics to track codec framework.
  optional AndroidCodecMetrics codec_metrics = 52;

  // Metric to track Android IO.
  optional AndroidIo android_io = 53;

  // IO metrics on Android in unaggregated form.
  // Note: this generates a lot of data so should not be requested unless it
  // is clear that this data is necessary.
  optional AndroidIoUnaggregated android_io_unagg = 54;

  // Metrics for App Not Responding (ANR) errors.
  optional AndroidAnrMetric android_anr = 55;

  // Aggregated Android Monitor Contention metrics
  optional AndroidMonitorContentionAggMetric android_monitor_contention_agg = 56;

  optional AndroidBootMetric android_boot = 57;

  // Metric for AdServices module.
  optional AdServicesMetric ad_services_metric = 58;

  optional SysuiNotifShadeListBuilderMetric sysui_notif_shade_list_builder_metric = 59;

  optional SysuiUpdateNotifOnUiModeChangedMetric sysui_update_notif_on_ui_mode_changed_metric = 60;

  // Metrics for Process starts.
  optional AndroidAppProcessStartsMetric android_app_process_starts = 61;

  // Android boot unaggregated metrics.
  optional AndroidBootUnagg android_boot_unagg = 62;

  // Android garbage collection metrics
  optional AndroidGarbageCollectionUnaggMetric android_garbage_collection_unagg = 63;

  // Multiuser - metrics for switching users.
  // Specific for Android Auto
  optional AndroidMultiuserMetric android_auto_multiuser = 64;

  // All blocking calls (e.g. binder calls) for a trace.
  optional AndroidBlockingCallsUnagg android_blocking_calls_unagg = 65;

  // Android OOM unaggregated metrics.
  optional AndroidOomAdjusterMetric android_oom_adjuster = 66;

  // Android
  // Demo extensions.
  extensions 450 to 499;

  // Vendor extensions.
  extensions 500 to 1000;

  // Chrome metrics.
  extensions 1001 to 2000;

  // WebView metrics.
  extensions 2001 to 2500;
}