1// Copyright 2017 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 ninja;
20option go_package = "android/soong/ui/status/ninja_frontend";
21
22message Status {
23  message TotalEdges {
24    // New value for total edges in the build.
25    optional uint32 total_edges = 1;
26  }
27
28  message BuildStarted {
29    // Number of jobs Ninja will run in parallel.
30    optional uint32 parallelism = 1;
31    // Verbose value passed to ninja.
32    optional bool verbose = 2;
33    // Critical path's running time in milliseconds
34    optional uint32 critical_path_time = 3;
35    // Total running time of every need-to-build edge in milliseconds
36    optional uint32 estimated_total_time = 4;
37  }
38
39  message BuildFinished {
40  }
41
42  message EdgeStarted {
43    // Edge identification number, unique to a Ninja run.
44    optional uint32 id = 1;
45    // Edge start time in milliseconds since Ninja started.
46    optional uint32 start_time = 2;
47    // List of edge inputs.
48    repeated string inputs = 3;
49    // List of edge outputs.
50    repeated string outputs = 4;
51    // Description field from the edge.
52    optional string desc = 5;
53    // Command field from the edge.
54    optional string command = 6;
55    // Edge uses console.
56    optional bool console = 7;
57    // Changed inputs since last build.
58    repeated string changed_inputs = 8;
59  }
60
61  message EdgeFinished {
62    // Edge identification number, unique to a Ninja run.
63    optional uint32 id = 1;
64    // Edge end time in milliseconds since Ninja started.
65    optional uint32 end_time = 2;
66    // Exit status (0 for success).
67    optional sint32 status = 3;
68    // Edge output, may contain ANSI codes.
69    optional string output = 4;
70    // Number of milliseconds spent executing in user mode
71    optional uint32 user_time = 5;
72    // Number of milliseconds spent executing in kernel mode
73    optional uint32 system_time = 6;
74    // Max resident set size in kB
75    optional uint64 max_rss_kb = 7;
76    // Minor page faults
77    optional uint64 minor_page_faults = 8;
78    // Major page faults
79    optional uint64 major_page_faults = 9;
80    // IO input in kB
81    optional uint64 io_input_kb = 10;
82    // IO output in kB
83    optional uint64 io_output_kb = 11;
84    // Voluntary context switches
85    optional uint64 voluntary_context_switches = 12;
86    // Involuntary context switches
87    optional uint64 involuntary_context_switches = 13;
88    // Arbitrary tags for build system profiling (module names and types, rule
89    // names, etc). Format of the string is implementation defined.
90    optional string tags = 14;
91  }
92
93  message Message {
94    enum Level {
95      INFO = 0;
96      WARNING = 1;
97      ERROR = 2;
98      DEBUG = 3;
99    }
100    // Message priority level (DEBUG, INFO, WARNING, ERROR).
101    optional Level level = 1 [default = INFO];
102    // Info/warning/error message from Ninja.
103    optional string message = 2;
104  }
105
106  optional TotalEdges total_edges = 1;
107  optional BuildStarted build_started = 2;
108  optional BuildFinished build_finished = 3;
109  optional EdgeStarted edge_started = 4;
110  optional EdgeFinished edge_finished = 5;
111  optional Message message = 6;
112}
113