bench: Improve output.

* etc/bench.pl.in (bench_grammar): Tune the printf format.
This commit is contained in:
Akim Demaille
2008-07-17 16:06:20 +02:00
parent 5b421a4e8e
commit 0cc5bead40
2 changed files with 12 additions and 1 deletions

View File

@@ -696,9 +696,15 @@ sub bench_grammar ($%)
# Display the sizes.
print "Sizes:\n";
my $width = 10;
for my $bench (keys %size)
{
printf "%10s: %10dkB\n", $bench, int ($size{$bench} / 1024);
$width = length $bench
if $width < length $bench;
}
for my $bench (keys %size)
{
printf "%${width}s: %5dkB\n", $bench, int ($size{$bench} / 1024);
}
}