This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add =+label feature, which appends the label to perl-name
authorJim Cromie <jim.cromie@gmail.com>
Sun, 10 Apr 2016 17:58:11 +0000 (11:58 -0600)
committerTony Cook <tony@develop-help.com>
Wed, 15 Jun 2016 01:52:08 +0000 (11:52 +1000)
commit857716c91d72a6a564885f5d4ead75033c1840ee
tree2b37296c330b62af2e59be9b9c1f4e8a3aa2cc90
parent44b1835744fc7d04d391b987c9b2ad4095b09b28
add =+label feature, which appends the label to perl-name

Using this reduces the burden of keeping each label unique,
simplifying the use of labels to name varying workloads created by
-Mfoo -M<something-heavy>

This enables an invocation like the following to run -DDEBUGGING
perls-A,B in bare mode, and heavily encumbered by -Dflag induced
overhead:

 $] perl Porting/bench.pl --jobs=2 \
    --tests=/loop::for::my/ \
    -- \
    perl-A=+bare perl-A=+workload -DpsltocPmfr \
    perl-B=+bare perl-B=+workload -DpsltocPmfr

Unfortunately, that example falls over, because the -D<blah> output
upsets cachegrind_parser.  That might be fixable by removing the
'2>&1' in the $cmd.  Nonetheless, workloads are constructible.

more prosaically:

 $] perl Porting/bench.pl --jobs=2 \
    --tests=/loop::for::my/ \
    -- perl5.18.2=+strict -Mstrict perl5.18.0=+dumper -MData::Dumper

yields:

Got eof for pid 11377 (loop::for::my_array4/perl5.18.0+dumper active/long loop)
...

loop::for::my_array4
empty for loop with my var and 4 integer array

       perl5.18.2+strict perl5.18.0+dumper
       ----------------- -----------------
    Ir            100.00            114.20
    Dr            100.00            119.35
    Dw            100.00            135.03
  COND            100.00             99.71
   IND            100.00            100.00

COND_m            100.00            119.64
 IND_m            100.00             92.31

 Ir_m1            100.00            100.00
 Dr_m1            100.00            100.00
 Dw_m1            100.00            100.00

 Ir_mm            100.00                 -
 Dr_mm            100.00                 -
 Dw_mm            100.00            100.00

AVERAGE

       perl5.18.2+strict perl5.18.0+dumper
       ----------------- -----------------
    Ir            100.00            114.56
    Dr            100.00            118.87
    Dw            100.00            133.30
  COND            100.00            100.41
   IND            100.00            100.00

COND_m            100.00             69.14
 IND_m            100.00             89.95

 Ir_m1            100.00            100.00
 Dr_m1            100.00            100.00
 Dw_m1            100.00            100.00

 Ir_mm            100.00            100.00
 Dr_mm            100.00            100.00
 Dw_mm            100.00            100.00
Porting/bench.pl