Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: masters/master.client.v8/master.cfg

Issue 2415703004: Enable merging buildbot builds dependent on queue length (Closed)
Patch Set: Review Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/buildbot_8_4p1/buildbot/process/builder.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: masters/master.client.v8/master.cfg
diff --git a/masters/master.client.v8/master.cfg b/masters/master.client.v8/master.cfg
index 16311011017ed67bc1e2a6dc8f1cabaee2b58a53..886516cdcb046510756c63d6b53b46be8fd37cd0 100644
--- a/masters/master.client.v8/master.cfg
+++ b/masters/master.client.v8/master.cfg
@@ -5,6 +5,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+
+from buildbot.process import buildrequest
from buildbot.scheduler import Nightly
from buildbot.scheduler import Scheduler
@@ -17,6 +19,7 @@ from master.factory import annotator_factory
import config
import master_site_config
+import math
import os
@@ -28,6 +31,15 @@ MAIL_NOTIFIER = ActiveMaster.is_production_host
c = BuildmasterConfig = {}
c['status'] = []
+def merge_requests_logarithmic(req1, req2, queue_length, merged_length):
+ """Merges builds dependent on the number of builds in the queue."""
+ if not buildrequest.BuildRequest.canBeMergedWith(req1, req2):
+ return False
+
+ return merged_length <= int(math.log(queue_length, 2))
+
+# Tell buildbot that we want to use a non-standard fuction with 4 parameters.
+setattr(merge_requests_logarithmic, 'with_length', True)
####### DATABASE
@@ -225,6 +237,7 @@ b_v8_linux_predictable = {
'factory': m_annotator.BaseFactory('v8'),
'category': CATEGORY_FYI + '|predictable',
'auto_reboot' : False,
+ 'mergeRequests': merge_requests_logarithmic,
}
b_v8_linux_interpreted_regexp = {
« no previous file with comments | « no previous file | third_party/buildbot_8_4p1/buildbot/process/builder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698