summaryrefslogtreecommitdiff
path: root/Porting/bench.pl
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2016-04-10 00:15:31 -0600
committerTony Cook <tony@develop-help.com>2016-06-15 11:52:08 +1000
commit1a961f9f4ca29c9cc14df1f66d0427e5cabfbf1b (patch)
tree76876ea871ce6e70a1a5a86b8395bdddaf4cd214 /Porting/bench.pl
parentc385646f2a7515c11ed819df7fd71e6476dd7bcb (diff)
downloadperl-1a961f9f4ca29c9cc14df1f66d0427e5cabfbf1b.tar.gz
grind_print: adjust for labels
since HEAD~1, data is stored by the label, not the perlname. simplify grind-print based upon this.
Diffstat (limited to 'Porting/bench.pl')
-rwxr-xr-xPorting/bench.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/Porting/bench.pl b/Porting/bench.pl
index 95e87f8926..bd26290ea0 100755
--- a/Porting/bench.pl
+++ b/Porting/bench.pl
@@ -945,7 +945,7 @@ sub grind_process {
my %counts;
my %data;
- my $perl_norm = $perls->[$OPTS{norm}][0]; # the name of the reference perl
+ my $perl_norm = $perls->[$OPTS{norm}][1]; # the label of the reference perl
for my $test_name (keys %$res) {
my $res1 = $res->{$test_name};
@@ -1101,6 +1101,7 @@ sub grind_print {
my ($results, $averages, $perls, $tests, $order) = @_;
my @perl_names = map $_->[0], @$perls;
+ my @perl_labels = map $_->[1], @$perls;
my %perl_labels;
$perl_labels{$_->[0]} = $_->[1] for @$perls;
@@ -1108,7 +1109,7 @@ sub grind_print {
# Calculate the width to display for each column.
my $min_width = $OPTS{raw} ? 8 : 6;
my @widths = map { length($_) < $min_width ? $min_width : length($_) }
- @perl_labels{@perl_names};
+ @perl_labels;
# Print standard header.
grind_blurb($perls);
@@ -1138,7 +1139,7 @@ sub grind_print {
print " " x $field_label_width;
for (0..$#widths) {
printf " %*s", $widths[$_],
- $i ? ('-' x$widths[$_]) : $perl_labels{$perl_names[$_]};
+ $i ? ('-' x$widths[$_]) : $perl_labels[$_];
}
print "\n";
}
@@ -1160,7 +1161,7 @@ sub grind_print {
print " " x $field_label_width;
for (0..$#widths) {
printf " %*s", $widths[$_],
- $i ? ('-' x$widths[$_]) : $perl_labels{$perl_names[$_]};
+ $i ? ('-' x$widths[$_]) : $perl_labels[$_];
}
print "\n";
}
@@ -1190,7 +1191,7 @@ sub grind_print {
}
for my $i (0..$#widths) {
- my $res2 = $res1->{$perl_names[$i]};
+ my $res2 = $res1->{$perl_labels[$i]};
my $p = $res2->{$field};
if (!defined $p) {
printf " %*s", $widths[$i], '-';