Profiling parallel tests
Eric Wilhelm
scratchcomputing at gmail.com
Fri Aug 22 16:20:02 UTC 2008
# from Andy Armstrong
# on Friday 22 August 2008 06:39:
>>> Correct. But I think it's worth clearing out the structures that
>>> relate to tests that have completed too - otherwise get_any() still
>>> has a lot of corpses to step over.
>>
>> There seems to already be some pruning in _find_next_job():
>>
>> # Prune any exhausted items.
>> shift @$seq while @$seq && _is_empty( $seq->[0] );
>>
>> That's doing something different from what you're suggesting?
>
>Dunno :)
Yes you do ;-) This is what we were talking about on irc.
The @$rules contains a lot of $seq = [...] items. When a $seq is done,
it becomes [] and gets left in @$rules.
So, Nicholas, what you have there is the only pruning (and also the
cause of the answer from get_all() changing.) But this means that
get_all() is continually checking the pile of []'s.
I think the $self->_is_done() thing could replace the get_all() in
the "spinner if($self->get_all())" bit, so long as you set the done
flag when you find the last empty sequence. At that point, having
these $seq = [] corpses might not matter so much.
--Eric
--
"I've often gotten the feeling that the only people who have learned
from computer assisted instruction are the authors."
--Ben Schneiderman
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the tapx-dev
mailing list