This commit adds to blead the accepted PR
https://github.com/Perl-Toolchain-Gang/Test-Harness/pull/98
but the updated module has not been released.
This commit allows a many-core processor to run the Perl test suite more
efficiently.
Prior to this commit, the timers for counting elapsed time and CPU usage
were begun when a job's first output appears. This yields inaccurate
results. These results are saved in t/test_state for future runs so
that they can start the longest-running tests first, which leads to
using the available cores more efficiently. (If you start a long running
test after everything else is nearly done, you have to wait for it to
finish before the suite as a whole is; if you start the long ones first,
and the shortest last, you don't have to wait very long for any
stragglers to complete.) Inaccurate results here lead to this
situation, which we were often seeing in the podcheck.t test.
The worst case is if there is heavy computation at the beginning of the
test being run. podcheck, for example, examines all the pods in the
directory structure to find which links to other pods do or do not have
corresponding anchors. Output doesn't happen until the analysis is
complete. On my system, this takes over 30 seconds, but prior to this
commit, what was noted was just the time required to do the output,
about 200 milliseconds. The result was that podcheck was viewed as
being one of the shortest tests run, so was started late in the process,
and generally held up the completion of it.
This commit by itself doesn't improve the test completion very much,
because, test tests are run a whole directory at a time, and the
directory podcheck is in, for example, is run last. The next commit
addresses that.
48 files changed:
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
use constant GOT_TIME_HIRES => do {
eval 'use Time::HiRes qw(time);';
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 METHODS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
$ENV{HARNESS_ACTIVE} = 1;
$ENV{HARNESS_VERSION} = $VERSION;
my ( $parser, $session ) = $self->make_parser($job);
$mux->add( $parser, [ $session, $job ] );
+
+ # The job has started: begin the timers
+ $parser->start_time( $parser->get_time );
+ $parser->start_times( $parser->get_times );
}
if ( my ( $parser, $stash, $result ) = $mux->next ) {
use TAP::Object;
use Text::ParseWords qw/shellwords/;
-our $VERSION = '3.42';
+our $VERSION = '3.43';
# Get the parts of @INC which are changed from the stock list AND
# preserve reordering of stock directories.
=head1 VERSION
-Version 3.42
+Version 3.43
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
my $DEFAULT_TAP_VERSION = 12;
my $MAX_TAP_VERSION = 13;
my $state = 'INIT';
my $state_table = $self->_make_state_table;
- $self->start_time( $self->get_time );
- $self->start_times( $self->get_times );
+ $self->start_time( $self->get_time ) unless $self->{start_time};
+ $self->start_times( $self->get_times ) unless $self->{start_times};
# Make next_state closure
my $next_state = sub {
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head2 DESCRIPTION
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
=head1 SYNOPSIS
use base 'TAP::Object';
-our $VERSION = '3.42';
+our $VERSION = '3.43';
# TODO:
# Handle blessed object syntax
=head1 VERSION
-Version 3.42
+Version 3.43
=head1 SYNOPSIS
use base 'TAP::Object';
-our $VERSION = '3.42';
+our $VERSION = '3.43';
my $ESCAPE_CHAR = qr{ [ \x00-\x1f \" ] }x;
my $ESCAPE_KEY = qr{ (?: ^\W ) | $ESCAPE_CHAR }x;
=head1 VERSION
-Version 3.42
+Version 3.43
=head1 SYNOPSIS
=head1 VERSION
-Version 3.42
+Version 3.43
=cut
-our $VERSION = '3.42';
+our $VERSION = '3.43';
# Backwards compatibility for exportable variable names.
*verbose = *Verbose;