[Python-Dev] 2.5a1 Performance

Brian Warner warner at lothar.com
Wed Apr 5 23:01:26 CEST 2006


> I still haven't figured out how to mutually lock out builders that are
> on the same slave. This is a frequent thing to happen, as people often
> check-in trunk and backported branch patches nearly simultaneously
> (which is fine, of course - the machines just have to cater with that).

You can tell the Builder to claim a slave-wide "Lock" before starting the
build. Only one build can claim this Lock at a time, which will probably
accomplish what you want for performance testing (assuming the host isn't
doing anything other than buildbot work, of course).

I don't know what the python buildbot's master.cfg looks like, but you'll
probably want to add something like this (taken from the buildbot.texinfo
user's manual)

 from buildbot import locks
 
 cpulock = locks.SlaveLock("cpu")
 b1 = {'name': 'buildername', 'slavename': 'bot-1', 'factory': f,
       'locks': [cpulock]}
 c['builders'].append(b1)

The name of the lock is meant for debugging, so you can tell why a given
builder is stalled. Each buildslave gets its own lock, and the builder claims
every lock listed in the 'locks' key before starting.

The one big problem with this approach is that the build looks like it's
stalled while it waits for the lock: you get a big yellow box between the
time it is supposed to start and the time it finally claims the lock.

Oh, and obviously you need to list the lock in all builders that are supposed
to compete for it.


cheers,
 -Brian


More information about the Python-Dev mailing list