-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathresourceusage.proto
128 lines (96 loc) · 3.99 KB
/
resourceusage.proto
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
syntax = "proto3";
package buildbarn.resourceusage;
import "google/protobuf/duration.proto";
option go_package = "github.com/buildbarn/bb-remote-execution/pkg/proto/resourceusage";
// File pool resource usage statistics. File pools are used by bb_worker
// to allocate temporary files that are created by build actions.
// Temporary files include output files created through the FUSE file
// system.
message FilePoolResourceUsage {
// Total number of files created.
uint64 files_created = 1;
// Maximum number of files that existed at some point in time.
uint64 files_count_peak = 2;
// Maximum total size of all files at some point in time.
uint64 files_size_bytes_peak = 3;
// Total number of ReadAt() calls performed.
uint64 reads_count = 4;
// Total amount of data returned by all ReadAt() calls.
uint64 reads_size_bytes = 5;
// Total number of WriteAt() calls performed.
uint64 writes_count = 6;
// Total amount of data processed by all WriteAt() calls.
uint64 writes_size_bytes = 7;
// Total number of Truncate() calls performed.
uint64 truncates_count = 8;
}
// The equivalent of 'struct rusage' in POSIX, generally returned by
// getrusage(2) or wait4(2).
message POSIXResourceUsage {
// ru_utime: Amount of CPU time in seconds spent in userspace.
google.protobuf.Duration user_time = 1;
// ru_stime: Amount of CPU time in seconds spent in kernelspace.
google.protobuf.Duration system_time = 2;
// ru_maxrss: Maximum amount of resident memory in bytes.
int64 maximum_resident_set_size = 3;
// ru_ixrss, ru_idrss and ru_isrss are omitted, as there is no
// portable way to obtain the number of ticks used to compute these
// integrals.
reserved 4, 5, 6;
// ru_minflt: Page reclaims.
int64 page_reclaims = 7;
// ru_majflt: Page faults.
int64 page_faults = 8;
// ru_nswap: Number of swaps.
int64 swaps = 9;
// ru_inblock: Block input operations.
int64 block_input_operations = 10;
// ru_oublock: Block output operations.
int64 block_output_operations = 11;
// ru_msgsnd: Messages sent.
int64 messages_sent = 12;
// ru_msgrcv: Messages received.
int64 messages_received = 13;
// ru_nsignals: Signals received.
int64 signals_received = 14;
// ru_nvcsw: Voluntary context switches.
int64 voluntary_context_switches = 15;
// ru_nivcsw: Involuntary context switches.
int64 involuntary_context_switches = 16;
// If abnormal process termination occurred, the name of the signal
// that was delivered, without the "SIG" prefix (e.g., "BUS", "KILL",
// "SEGV").
//
// Abnormal process termination can occur by calling abort(), or by
// receiving a signal for which no signal handler is installed.
string termination_signal = 17;
}
// A representation of unique factors that may be aggregated to
// compute a given build action's total price.
message MonetaryResourceUsage {
message Expense {
// The type of currency the cost is measured in. Required to be in
// ISO 4217 format: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
string currency = 1;
// The value of a specific expense for a build action.
double cost = 2;
}
// A mapping of expense categories to their respective costs.
map<string, Expense> expenses = 1;
}
// Input root resource usage statistics. These statistics indicate how
// many directories and files inside the virtual file system were
// accessed. These statistics are only reported if prefetching is
// enabled, as they are computed together with the Bloom filter.
message InputRootResourceUsage {
// The number of directories in the input root that have been
// resolved. This equates to the total number of directories that are
// present in all directories that have been read.
uint64 directories_resolved = 1;
// The number of directories whose contents have been read from the
// Content Addressable Storage (CAS).
uint64 directories_read = 2;
// The number of files whose contents have been read from the Content
// Addressable Storage (CAS).
uint64 files_read = 3;
}