aboutsummaryrefslogtreecommitdiff
path: root/src/frontend.proto
blob: 4a587267179a5dfcb365f69ad73a80a790e4af90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package ninja;

message Status {
  message TotalEdges {
    // New value for total edges in the build.
    optional uint32 total_edges = 1;
  }

  message BuildStarted {
    // Number of jobs Ninja will run in parallel.
    optional uint32 parallelism = 1;
    // Verbose value passed to ninja.
    optional bool verbose = 2;
    optional uint32 critical_path_time = 3;
    optional uint32 estimated_total_time = 4;
  }

  message BuildFinished {
  }

  message EdgeStarted {
    // Edge identification number, unique to a Ninja run.
    optional uint32 id = 1;
    // Edge start time in milliseconds since Ninja started.
    optional uint32 start_time = 2;
    // List of edge inputs.
    repeated string inputs = 3;
    // List of edge outputs.
    repeated string outputs = 4;
    // Description field from the edge.
    optional string desc = 5;
    // Command field from the edge.
    optional string command = 6;
    // Edge uses console.
    optional bool console = 7;
  }

  message EdgeFinished {
    // Edge identification number, unique to a Ninja run.
    optional uint32 id = 1;
    // Edge end time in milliseconds since Ninja started.
    optional uint32 end_time = 2;
    // Exit status (0 for success).
    optional sint32 status = 3;
    // Edge output, may contain ANSI codes.
    optional string output = 4;
    // Number of milliseconds spent executing in user mode
    optional uint32 user_time = 5;
    // Number of milliseconds spent executing in kernel mode
    optional uint32 system_time = 6;
    // Max resident set size in kB
    optional uint64 max_rss_kb = 7;
    // Minor page faults
    optional uint64 minor_page_faults = 8;
    // Major page faults
    optional uint64 major_page_faults = 9;
    // IO input in kB
    optional uint64 io_input_kb = 10;
    // IO output in kB
    optional uint64 io_output_kb = 11;
    // Voluntary context switches
    optional uint64 voluntary_context_switches = 12;
    // Involuntary context switches
    optional uint64 involuntary_context_switches = 13;
    // Arbitrary tags for build system profiling (module names and types, rule
    // names, etc). Format of the string is implementation defined.
    optional string tags = 14;
  }

  message Message {
    enum Level {
      INFO = 0;
      WARNING = 1;
      ERROR = 2;
      DEBUG = 3;
    }
    // Message priority level (DEBUG, INFO, WARNING, ERROR).
    optional Level level = 1 [default = INFO];
    // Info/warning/error message from Ninja.
    optional string message = 2;
  }

  optional TotalEdges total_edges = 1;
  optional BuildStarted build_started = 2;
  optional BuildFinished build_finished = 3;
  optional EdgeStarted edge_started = 4;
  optional EdgeFinished edge_finished = 5;
  optional Message message = 6;
}