develooper Front page | perl.perl5.porters | Postings from October 2016

regarding slow tests

Thread Next
From:
Jarkko Hietaniemi
Date:
October 16, 2016 21:57
Subject:
regarding slow tests
Message ID:
46dc9dd8-2552-4dac-f90f-520988bf62f9@iki.fi
In http://perl5.git.perl.org/perl.git/commit/877b9829 I added 5-minute
watchdogs to two tests, since in slow machines they will grind for ever,
for no good reason.  (I also noted that the uniprops.t is another good
(bad) candidate, and additionally now note that UCD.t would be another.)

How did I come up with these tests?

Well, I now added a script for massaging the output of "env 
HARNESS_TIMER=1 make test" in 
http://perl5.git.perl.org/perl.git/commitdiff/87af8d55

Feed it the output, it will scale/sort/select it as requested.  I am 
attaching a sample output, later I will follow-up with some more.  The 
sample is from an iMac with a reasonably recent i7, not a slow system.

Sample usage: display anything with more than seconds of wall time,
also show the header.

perl Porting/harness-timer-report.pl --min=wall=10 --show=header 
/tmp/sample.log
TEST WALL SELF KIDS CPU RATIO
t/re/fold_grind 21.433000 21.300000 0.060000 21.360000 0.996594
lib/Unicode/UCD 17.798000 17.580000 0.200000 17.780000 0.998989
lib/Benchmark 16.667000 16.610000 0.050000 16.660000 0.999580
t/re/uniprops 16.245000 15.570000 0.200000 15.770000 0.970760
cpan/ExtUtils-MakeMaker/t/02-xsdynamic 16.031000 11.150000 3.610000 
14.760000 0.920716
t/porting/podcheck 18.765000 14.290000 0.450000 14.740000 0.785505
cpan/Memoize/t/speed 14.676000 14.650000 0.020000 14.670000 0.999591
ext/XS-APItest/t/handy 12.986000 12.570000 0.370000 12.940000 0.996458
ext/XS-APItest/t/utf8 10.220000 9.860000 0.360000 10.220000 1.000000
lib/charnames 10.013000 9.500000 0.420000 9.920000 0.990712
lib/warnings 11.037000 5.900000 3.790000 9.690000 0.877956
t/op/sigdispatch 11.066000 4.040000 0.020000 4.060000 0.366890
t/io/crlf_through 11.118000 0.810000 0.870000 1.680000 0.151106
t/io/through 11.101000 0.800000 0.870000 1.670000 0.150437
dist/Tie-File/t/28_mtwrite 10.952000 0.650000 0.730000 1.380000 0.126004
t/comp/utf 13.036000 0.580000 0.560000 1.140000 0.087450
cpan/AutoLoader/t/02AutoSplit 16.363000 0.260000 0.060000 0.320000 0.019556
cpan/File-Temp/t/fork 17.052000 0.030000 0.020000 0.050000 0.002932
dist/IO/t/io_sock 19.056000 0.030000 0.010000 0.040000 0.002099
cpan/Memoize/t/expmod_t 24.030000 0.020000 0.000000 0.020000 0.000832

The RATIO is the CPU/WALL, and CPU is SELF + KIDS.  The numbers (except 
for the RATIO) are seconds.

Another one to try out: scale the values by the sum of each column, 
display the tests which took more than one percent of the total test time:

perl Porting/harness-timer-report.pl --scale=sum --min=cpu=0.01 
/tmp/sample.log

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About