X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FBenchmark.pm;h=920968d01d7599b0e6193a7b237673c117f10498;hb=7be077a223af977e8b405c397059e6785e6fe310;hp=fe77dd0a6194fda7e987f270712041b34675c2f6;hpb=6ee623d521a149edc6574c512fa951a192cd086a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index fe77dd0..920968d 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -295,12 +295,12 @@ sub timestr { $style ||= $defaultstyle; $style = ($ct>0) ? 'all' : 'noc' if $style eq 'auto'; my $s = "@t $style"; # default for unknown style - $s=sprintf("%2d wallclock secs (%$f usr %$f sys + %$f cusr %$f csys = %$f CPU secs)", + $s=sprintf("%2d wallclock secs (%$f usr %$f sys + %$f cusr %$f csys = %$f CPU)", @t,$t) if $style eq 'all'; - $s=sprintf("%$f CPU secs (%$f usr + %$f sys)", - $pt,$pu,$ps) if $style eq 'noc'; - $s=sprintf("%$f CPU secs (%$f cusr %$f csys)", - $ct,$cu,$cs) if $style eq 'nop'; + $s=sprintf("%2d wallclock secs (%$f usr + %$f sys = %$f CPU)", + $r,$pu,$ps,$pt) if $style eq 'noc'; + $s=sprintf("%2d wallclock secs (%$f cusr + %$f csys = %$f CPU)", + $r,$cu,$cs,$ct) if $style eq 'nop'; $s .= sprintf(" @ %$f/s (n=$n)", $n / ( $pu + $ps )) if $n; $s; }