• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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;
94}
95
96message PerfInfo {
97  // The description for the phase/action/part while the tool running.
98  optional string desc = 1;
99
100  // The name for the running phase/action/part.
101  optional string name = 2;
102
103  // The absolute start time.
104  // The number of nanoseconds elapsed since January 1, 1970 UTC.
105  optional uint64 start_time = 3;
106
107  // The real running time.
108  // The number of nanoseconds elapsed since start_time.
109  optional uint64 real_time = 4;
110
111  // The number of MB for memory use.
112  optional uint64 memory_use = 5;
113}
114
115message ModuleTypeInfo {
116  enum BUILDSYSTEM {
117    UNKNOWN = 0;
118    SOONG = 1;
119    MAKE = 2;
120  }
121  // The build system, eg. Soong or Make.
122  optional BUILDSYSTEM build_system = 1 [default = UNKNOWN];
123
124  // The module type, eg. java_library, cc_binary, and etc.
125  optional string module_type = 2;
126
127  // The number of logical modules.
128  optional uint32 num_of_modules = 3;
129}
130