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 = "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  }
34
35  message BuildFinished {
36  }
37
38  message EdgeStarted {
39    // Edge identification number, unique to a Ninja run.
40    optional uint32 id = 1;
41    // Edge start time in milliseconds since Ninja started.
42    optional uint32 start_time = 2;
43    // List of edge inputs.
44    repeated string inputs = 3;
45    // List of edge outputs.
46    repeated string outputs = 4;
47    // Description field from the edge.
48    optional string desc = 5;
49    // Command field from the edge.
50    optional string command = 6;
51    // Edge uses console.
52    optional bool console = 7;
53  }
54
55  message EdgeFinished {
56    // Edge identification number, unique to a Ninja run.
57    optional uint32 id = 1;
58    // Edge end time in milliseconds since Ninja started.
59    optional uint32 end_time = 2;
60    // Exit status (0 for success).
61    optional sint32 status = 3;
62    // Edge output, may contain ANSI codes.
63    optional string output = 4;
64    // Number of milliseconds spent executing in user mode
65    optional uint32 user_time = 5;
66    // Number of milliseconds spent executing in kernel mode
67    optional uint32 system_time = 6;
68  }
69
70  message Message {
71    enum Level {
72      INFO = 0;
73      WARNING = 1;
74      ERROR = 2;
75      DEBUG = 3;
76    }
77    // Message priority level (DEBUG, INFO, WARNING, ERROR).
78    optional Level level = 1 [default = INFO];
79    // Info/warning/error message from Ninja.
80    optional string message = 2;
81  }
82
83  optional TotalEdges total_edges = 1;
84  optional BuildStarted build_started = 2;
85  optional BuildFinished build_finished = 3;
86  optional EdgeStarted edge_started = 4;
87  optional EdgeFinished edge_finished = 5;
88  optional Message message = 6;
89}
90