1/*
2 * Copyright (C) 2019 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
21message AndroidCpuMetric {
22  // Next id: 6
23  message Metrics {
24    // CPU megacycles (i.e. cycles divided by 1e6).
25    optional int64 mcycles = 1;
26
27    // Total time the thread was running for this breakdown in
28    // nanoseconds.
29    optional int64 runtime_ns = 2;
30
31    // Min/max/average CPU frequency weighted by the time the CPU was
32    // running at each frequency in this breakdown.
33    optional int64 min_freq_khz = 3;
34    optional int64 max_freq_khz = 4;
35    optional int64 avg_freq_khz = 5;
36  }
37
38  // Next id: 7
39  message CoreData {
40    optional uint32 id = 1;
41    optional Metrics metrics = 6;
42
43    reserved 2 to 5;
44  }
45
46  // Next id: 3
47  message CoreTypeData {
48    optional string type = 1;
49    optional Metrics metrics = 2;
50  }
51
52  // Next id: 7
53  message Thread {
54    optional string name = 1;
55    optional Metrics metrics = 4;
56
57    // Breakdowns of above metrics.
58    repeated CoreData core = 2;
59    repeated CoreTypeData core_type = 5;
60
61    reserved 3;
62  }
63
64  // Next id: 8
65  message Process {
66    optional string name = 1;
67    optional Metrics metrics = 4;
68
69    // Breakdowns of above metrics.
70    repeated Thread threads = 6;
71    repeated CoreData core = 7;
72    repeated CoreTypeData core_type = 5;
73
74    reserved 3;
75  }
76
77  repeated Process process_info = 1;
78}
79