• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    // Max resident set size in kB
69    optional uint64 max_rss_kb = 7;
70    // Minor page faults
71    optional uint64 minor_page_faults = 8;
72    // Major page faults
73    optional uint64 major_page_faults = 9;
74    // IO input in kB
75    optional uint64 io_input_kb = 10;
76    // IO output in kB
77    optional uint64 io_output_kb = 11;
78    // Voluntary context switches
79    optional uint64 voluntary_context_switches = 12;
80    // Involuntary context switches
81    optional uint64 involuntary_context_switches = 13;
82  }
83
84  message Message {
85    enum Level {
86      INFO = 0;
87      WARNING = 1;
88      ERROR = 2;
89      DEBUG = 3;
90    }
91    // Message priority level (DEBUG, INFO, WARNING, ERROR).
92    optional Level level = 1 [default = INFO];
93    // Info/warning/error message from Ninja.
94    optional string message = 2;
95  }
96
97  optional TotalEdges total_edges = 1;
98  optional BuildStarted build_started = 2;
99  optional BuildFinished build_finished = 3;
100  optional EdgeStarted edge_started = 4;
101  optional EdgeFinished edge_finished = 5;
102  optional Message message = 6;
103}
104