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

Side by Side Diff: masters/master.client.v8/master.cfg

Issue 2415703004: Enable merging buildbot builds dependent on queue length (Closed)
Patch Set: Pass also number of merged builds 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 unified diff | Download patch
OLDNEW
1 # -*- python -*- 1 # -*- python -*-
2 # ex: set syntax=python: 2 # ex: set syntax=python:
3 3
4 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 4 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8
9 from buildbot.process import buildrequest
8 from buildbot.scheduler import Nightly 10 from buildbot.scheduler import Nightly
9 from buildbot.scheduler import Scheduler 11 from buildbot.scheduler import Scheduler
10 12
11 from master import gitiles_poller 13 from master import gitiles_poller
12 from master import master_config 14 from master import master_config
13 from master import master_utils 15 from master import master_utils
14 from master import slaves_list 16 from master import slaves_list
15 from master.factory import annotator_factory 17 from master.factory import annotator_factory
16 18
17 import config 19 import config
18 import master_site_config 20 import master_site_config
19 21
22 import math
20 import os 23 import os
21 24
22 25
23 ActiveMaster = master_site_config.V8 26 ActiveMaster = master_site_config.V8
24 MAIL_NOTIFIER = ActiveMaster.is_production_host 27 MAIL_NOTIFIER = ActiveMaster.is_production_host
25 28
26 # This is the dictionary that the buildmaster pays attention to. We also use 29 # This is the dictionary that the buildmaster pays attention to. We also use
27 # a shorter alias to save typing. 30 # a shorter alias to save typing.
28 c = BuildmasterConfig = {} 31 c = BuildmasterConfig = {}
29 c['status'] = [] 32 c['status'] = []
30 33
34 def merge_requests_logarithmic(req1, req2, queue_length, merged_length):
35 """Merges builds dependent on the number of builds in the queue."""
36 if not buildrequest.BuildRequest.canBeMergedWith(req1, req2):
37 return False
38
39 return merged_length <= int(math.log(queue_length, 2))
31 40
32 ####### DATABASE 41 ####### DATABASE
33 42
34 config.DatabaseSetup(c) 43 config.DatabaseSetup(c)
35 44
36 ####### CHANGESOURCES 45 ####### CHANGESOURCES
37 46
38 comparator = gitiles_poller.GitilesRevisionComparator() 47 comparator = gitiles_poller.GitilesRevisionComparator()
39 c['change_source'] = [ 48 c['change_source'] = [
40 gitiles_poller.GitilesPoller( 49 gitiles_poller.GitilesPoller(
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 'factory': m_annotator.BaseFactory('v8'), 227 'factory': m_annotator.BaseFactory('v8'),
219 'category': CATEGORY_FYI, 228 'category': CATEGORY_FYI,
220 'auto_reboot' : False, 229 'auto_reboot' : False,
221 } 230 }
222 231
223 b_v8_linux_predictable = { 232 b_v8_linux_predictable = {
224 'name': 'V8 Linux - predictable', 233 'name': 'V8 Linux - predictable',
225 'factory': m_annotator.BaseFactory('v8'), 234 'factory': m_annotator.BaseFactory('v8'),
226 'category': CATEGORY_FYI + '|predictable', 235 'category': CATEGORY_FYI + '|predictable',
227 'auto_reboot' : False, 236 'auto_reboot' : False,
237 'mergeRequests': merge_requests_logarithmic,
228 } 238 }
229 239
230 b_v8_linux_interpreted_regexp = { 240 b_v8_linux_interpreted_regexp = {
231 'name': 'V8 Linux - interpreted regexp', 241 'name': 'V8 Linux - interpreted regexp',
232 'builddir': 'v8-linux-interpreted-regexp', 242 'builddir': 'v8-linux-interpreted-regexp',
233 'factory': m_annotator.BaseFactory('v8'), 243 'factory': m_annotator.BaseFactory('v8'),
234 'category': CATEGORY_FYI, 244 'category': CATEGORY_FYI,
235 'auto_reboot' : False, 245 'auto_reboot' : False,
236 } 246 }
237 247
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 # too low. Must keep at least a few days worth of builds. 701 # too low. Must keep at least a few days worth of builds.
692 c['buildHorizon'] = 1000 702 c['buildHorizon'] = 1000
693 c['logHorizon'] = 500 703 c['logHorizon'] = 500
694 # Must be at least 2x the number of slaves. 704 # Must be at least 2x the number of slaves.
695 c['eventHorizon'] = 200 705 c['eventHorizon'] = 200
696 706
697 ####### PROJECT IDENTITY 707 ####### PROJECT IDENTITY
698 708
699 c['projectName'] = ActiveMaster.project_name 709 c['projectName'] = ActiveMaster.project_name
700 c['projectURL'] = config.Master.project_url 710 c['projectURL'] = config.Master.project_url
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698