diff options
author | Karl Williamson <khw@cpan.org> | 2020-04-12 10:14:25 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-02 14:32:13 -0700 |
commit | f0ba45bd255e8eb18fb9ac59aa032cc44a0b8633 (patch) | |
tree | 917cb2daf74771709c55a61206d65b694cd3325e /cpan/Text-Tabs | |
parent | 6eef26b1c82a35912e0b0e884a71a645d4e7cf20 (diff) | |
download | perl-f0ba45bd255e8eb18fb9ac59aa032cc44a0b8633.tar.gz |
TAP::Harness: Move timer initialization
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.
Diffstat (limited to 'cpan/Text-Tabs')
0 files changed, 0 insertions, 0 deletions