xref: /aosp_15_r20/external/perfetto/protos/perfetto/metrics/android/simpleperf.proto (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1/*
2 * Copyright (C) 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package perfetto.protos;
20
21// Metric that stores information related to atrace events generated by
22// simpleperf tool
23message AndroidSimpleperfMetric {
24  optional double urgent_ratio = 1;
25
26  message PerfEventMetric {
27    // Simpleperf event name
28    optional string name = 1;
29
30    message Thread {
31      // Thread ID
32      optional int32 tid = 1;
33      // Thread name
34      optional string name = 2;
35      // CPU ID
36      optional int32 cpu = 3;
37      // Total counter value
38      optional double total = 4;
39    }
40
41    message Process {
42      // Process ID
43      optional int32 pid = 1;
44      // Process name
45      optional string name = 2;
46      // Metrics for each thread in this process.
47      repeated Thread threads = 3;
48      // Total counter value over all threads in this process
49      optional double total = 4;
50    }
51
52    // Metrics for each process
53    repeated Process processes = 2;
54
55    // Total counter value over all processes and threads
56    optional double total = 3;
57  }
58
59  repeated PerfEventMetric events = 2;
60}
61