Bug#496009: perl-modules: time summary from Benchmark contains extra space

brian m. carlson sandals at crustytoothpaste.net
Sun May 31 18:55:26 BST 2020


On 2020-05-31 at 17:19:15, Niko Tyni wrote:
> Hi, sorry that nobody answered this before.
> 
> I'm reviewing some old bugs and while the Benchmark output in this one
> hasn't changed in twelve years AFAICS, I'm not sure I get the problem.
> 
> What extra space are you referring to above? I see some *after* the first
> parenthesis, but the one between 'secs' and '(' seems appropriate.
> 
> In case you mean the space after the first parenthesis, that's a direct
> result of the documented default %5.2f format you mentioned, right?
> 
>  % perl -MBenchmark -le '$t1 = Benchmark->new; sleep 1; $t2 = Benchmark->new; print timestr(timediff($t2, $t1))'
>   1 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU)

Yes, the report was about the space directly after the parenthesis.
Since there isn't one before the closing parenthesis, there shouldn't be
one after the opening parenthesis.  Therefore, the format should
probably be %4.2f instead of %5.2f.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/perl-maintainers/attachments/20200531/e4073939/attachment.sig>


More information about the Perl-maintainers mailing list