summaryrefslogtreecommitdiff
path: root/Porting/bench.pl
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2017-10-20 12:35:18 +0100
committerDavid Mitchell <davem@iabyn.com>2017-10-23 11:52:02 +0100
commitd00aa1f4fe6b263e1c11868c16478ef39d228b35 (patch)
treec9b64f62dc61aecb231b78929cbfc4b2a5202021 /Porting/bench.pl
parenta6d04d4a416678fd2fca673a2ae82d27327a17de (diff)
downloadperl-d00aa1f4fe6b263e1c11868c16478ef39d228b35.tar.gz
bench.pl --compact: display description too
As well as displaying the test name on each line, e.g. call::sub::empty display the description too, e.g. call::sub::empty function call with no args or body
Diffstat (limited to 'Porting/bench.pl')
-rwxr-xr-xPorting/bench.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/Porting/bench.pl b/Porting/bench.pl
index cdce94d526..2bd3d63f77 100755
--- a/Porting/bench.pl
+++ b/Porting/bench.pl
@@ -1652,10 +1652,19 @@ sub grind_print_compact {
printf " %*s", $width, '------' for @fields;
print "\n";
+ my $name_width = 0;
+ for (@test_names) {
+ $name_width = length if length > $name_width;
+ }
+
for my $test_name (@test_names) {
my $doing_ave = ($test_name eq 'AVERAGE');
my $res = $doing_ave ? $averages : $results->{$test_name};
$res = $res->{$perls->[$which_perl][1]};
+ my $desc = $doing_ave
+ ? $test_name
+ : sprintf "%-*s %s", $name_width, $test_name,
+ $tests->{$test_name}{desc};
for my $field (@fields) {
my $p = $res->{$field};
@@ -1671,7 +1680,7 @@ sub grind_print_compact {
}
- print " $test_name\n";
+ print " $desc\n";
}
}