Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/bb_runner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ func main() {
commandCreator,
configuration.SetTmpdirEnvironmentVariable,
)
if configuration.SampleCgroupResourceUsage {
r, err = runner.NewCgroupResourceUsageSamplingRunner(r)
if err != nil {
return util.StatusWrap(err, "Failed to create cgroup resource usage sampling runner")
}
}

// Let bb_runner replace temporary directories with symbolic
// links pointing to the temporary directory set up by
Expand Down
13 changes: 11 additions & 2 deletions pkg/proto/configuration/bb_runner/bb_runner.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions pkg/proto/configuration/bb_runner/bb_runner.proto
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,16 @@ message ApplicationConfiguration {
// https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/exec/local/XcodeLocalEnvProvider.java
// https://www.smileykeith.com/2021/03/08/locking-xcode-in-bazel/
map<string, string> apple_xcode_developer_directories = 14;

// Sample cgroup v2 resource usage counters around each action.
//
// This should only be enabled when bb_worker sends at most one action to
// this bb_runner at a time. In particular, setting
// RunnerConfiguration.concurrency > 1 for this runner is incompatible.
//
// The bb_runner process should also have a cgroup whose activity is
// acceptable to include in the reported usage. If multiple runners or
// actions share the cgroup, the sampled counter deltas include unrelated
// work and are misleading.
bool sample_cgroup_resource_usage = 15;
}
197 changes: 180 additions & 17 deletions pkg/proto/resourceusage/resourceusage.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading