diff options
author | Akim Demaille <demaille@gostai.com> | 2008-07-17 16:06:20 +0200 |
---|---|---|
committer | Akim Demaille <demaille@gostai.com> | 2008-11-03 22:00:53 +0100 |
commit | 0cc5bead400aadfe9c5e4b3dfb9f70ee7e31e833 (patch) | |
tree | 9810aedaf47f395ce9219df6cd7224d5060e8092 /etc | |
parent | 5b421a4e8ef66052fd5aa72add2030da679d220e (diff) | |
download | bison-0cc5bead400aadfe9c5e4b3dfb9f70ee7e31e833.tar.gz |
bench: Improve output.
* etc/bench.pl.in (bench_grammar): Tune the printf format.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/bench.pl.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/bench.pl.in b/etc/bench.pl.in index 481f3dda..eadfa4b3 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -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); } } |