Rev 4623: Some tuning and cleanup. in file:///home/vila/src/bzr/bugs/selftest/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Aug 18 18:14:08 BST 2009
At file:///home/vila/src/bzr/bugs/selftest/
------------------------------------------------------------
revno: 4623
revision-id: v.ladeuil+lp at free.fr-20090818171407-s4jyuywutq8yx681
parent: v.ladeuil+lp at free.fr-20090818170201-s4pz2jzh7522e4x0
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: selftest
timestamp: Tue 2009-08-18 19:14:07 +0200
message:
Some tuning and cleanup.
* bzrlib/tests/__init__.py:
(fork_for_tests.TestInOtherProcess.run): Cap slize size at 8 to
avoid spawning too much processes.
(fork_for_tests.TestInOtherProcess.run_slice): Don't leave zombies
around, that hurts performances when tenths or hundreds are
produced.
-------------- next part --------------
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2009-08-18 17:02:01 +0000
+++ b/bzrlib/tests/__init__.py 2009-08-18 17:14:07 +0000
@@ -3065,7 +3065,7 @@
# handle as many slices as there are children and reducing the
# slice size from there.
slice_size = ((nb_tests - cur_test)
- / (concurrency * concurrency)) + 1
+ / (concurrency * concurrency)) + 8
print '%5d/%5d ------> New slice on %d: %5d' % (
cur_test, nb_tests, self.rank, slice_size)
# give a slice to first free child
@@ -3111,7 +3111,7 @@
test = ProtocolTestCase(feedback)
test.run(result)
finally:
- os.waitpid(pid, os.WNOHANG)
+ os.waitpid(pid, 0)
suite_semaphore = threading.Semaphore(1)
for proc in range(0, concurrency):
More information about the bazaar-commits
mailing list