blob: 5d26b673d00aeae15a437b4e0214d06f2b672005 [file] [log] [blame]
Nan Zhang17f27672018-12-12 16:01:49 -08001// Copyright 2018 Google Inc. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto2";
16
17option optimize_for = LITE_RUNTIME;
18
19package build_metrics;
20option go_package = "metrics_proto";
21
22message MetricsBase {
23 // Timestamp generated when the build starts.
24 optional int64 build_date_timestamp = 1;
25
26 // It is usually used to specify the branch name [and release candidate].
27 optional string build_id = 2;
28
29 // The platform version codename, eg. P, Q, REL.
30 optional string platform_version_codename = 3;
31
32 // The target product information, eg. aosp_arm.
33 optional string target_product = 4;
34
35 enum BUILDVARIANT {
36 USER = 0;
37 USERDEBUG = 1;
38 ENG = 2;
39 }
40 // The target build variant information, eg. eng.
41 optional BUILDVARIANT target_build_variant = 5 [default = ENG];
42
43 enum ARCH {
44 UNKNOWN = 0;
45 ARM = 1;
46 ARM64 = 2;
47 X86 = 3;
48 X86_64 = 4;
49 }
50 // The target arch information, eg. arm.
51 optional ARCH target_arch = 6 [default = UNKNOWN];
52
53 // The target arch variant information, eg. armv7-a-neon.
54 optional string target_arch_variant = 7;
55
56 // The target cpu variant information, eg. generic.
57 optional string target_cpu_variant = 8;
58
59 // The host arch information, eg. x86_64.
60 optional ARCH host_arch = 9 [default = UNKNOWN];
61
62 // The host 2nd arch information, eg. x86.
63 optional ARCH host_2nd_arch = 10 [default = UNKNOWN];
64
65 // The host os information, eg. linux.
66 optional string host_os = 11;
67
68 // The host os extra information, eg. Linux-4.17.0-3rodete2-amd64-x86_64-Debian-GNU.
69 optional string host_os_extra = 12;
70
71 // The host cross os information, eg. windows.
72 optional string host_cross_os = 13;
73
74 // The host cross arch information, eg. x86.
75 optional string host_cross_arch = 14;
76
77 // The host cross 2nd arch information, eg. x86_64.
78 optional string host_cross_2nd_arch = 15;
79
80 // The directory for generated built artifacts installation, eg. out.
81 optional string out_dir = 16;
82
83 // The metrics for calling various tools (microfactory) before Soong_UI starts.
84 repeated PerfInfo setup_tools = 17;
85
86 // The metrics for calling Kati by multiple times.
87 repeated PerfInfo kati_runs = 18;
88
89 // The metrics for calling Soong.
90 repeated PerfInfo soong_runs = 19;
91
92 // The metrics for calling Ninja.
93 repeated PerfInfo ninja_runs = 20;
Patrice Arruda5eae8cd2020-08-11 20:41:11 +000094
95 optional BuildConfig build_config = 23;
Patrice Arrudaaf7b75b2020-10-12 22:38:06 +000096
97 // The hostname of the machine.
98 optional string hostname = 24;
Patrice Arruda5eae8cd2020-08-11 20:41:11 +000099}
100
101message BuildConfig {
102 optional bool use_goma = 1;
103
104 optional bool use_rbe = 2;
Patrice Arruda3fc4c982020-09-28 18:22:07 +0000105
106 optional bool force_use_goma = 3;
Nan Zhang17f27672018-12-12 16:01:49 -0800107}
108
109message PerfInfo {
110 // The description for the phase/action/part while the tool running.
111 optional string desc = 1;
112
113 // The name for the running phase/action/part.
114 optional string name = 2;
115
116 // The absolute start time.
117 // The number of nanoseconds elapsed since January 1, 1970 UTC.
118 optional uint64 start_time = 3;
119
120 // The real running time.
121 // The number of nanoseconds elapsed since start_time.
122 optional uint64 real_time = 4;
123
124 // The number of MB for memory use.
125 optional uint64 memory_use = 5;
126}
127
128message ModuleTypeInfo {
129 enum BUILDSYSTEM {
130 UNKNOWN = 0;
131 SOONG = 1;
132 MAKE = 2;
133 }
134 // The build system, eg. Soong or Make.
135 optional BUILDSYSTEM build_system = 1 [default = UNKNOWN];
136
137 // The module type, eg. java_library, cc_binary, and etc.
138 optional string module_type = 2;
139
140 // The number of logical modules.
141 optional uint32 num_of_modules = 3;
142}