Browse Source

reclient: Enable racing for chrome developers

racing_bias=0.95 is a best guess based on benchmarks on my glinux and gwindows cloudtops, and my gmac laptop. I will monitor build performance data and adjust the bias based on that.

Bug: b/288285261
Change-Id: Ie8652281f7bc815e64978bcd56a75e5ec28e2132
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4633180
Commit-Queue: Ben Segall <bentekkie@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Ben Segall 2 years ago
parent
commit
24ac2543c7
1 changed files with 8 additions and 0 deletions
  1. 8 0
      reclient_helper.py

+ 8 - 0
reclient_helper.py

@@ -165,6 +165,12 @@ def set_reproxy_path_flags(out_dir, make_dirs=True):
         hashlib.sha256(tmp_dir.encode()).hexdigest())
 
 
+def enable_racing():
+  os.environ.setdefault("RBE_exec_strategy", "racing")
+  # TODO(b/288285261) Tune bias once latency data has been gathered.
+  os.environ.setdefault("RBE_racing_bias", "0.95")
+
+
 @contextlib.contextmanager
 def build_context(argv, tool):
   # If use_remoteexec is set, but the reclient binaries or configs don't
@@ -198,6 +204,8 @@ def build_context(argv, tool):
     print('WARNING: Using RBE_instance=%s\n' %
           os.environ.get('RBE_instance', ''))
 
+  enable_racing()
+
   reproxy_ret_code = start_reproxy(reclient_cfg, reclient_bin_dir)
   if reproxy_ret_code != 0:
     yield reproxy_ret_code