diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-02 08:13:04 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-02 08:13:04 +0000 |
commit | ce9550df90b6136a9e0c062522e2fe9d093f297a (patch) | |
tree | 00cee2871ab0980b1ff6f6088c7e7fdecc463ff4 /lib/Benchmark.pm | |
parent | fc19f8d03323992b29a43eebb298905a1efdc984 (diff) | |
download | perl-ce9550df90b6136a9e0c062522e2fe9d093f297a.tar.gz |
Benchmark displays bogus CPU stats (suggested by Cedric Auzanne
<cedric.auzanne@nist.gov>)
p4raw-id: //depot/perl@4958
Diffstat (limited to 'lib/Benchmark.pm')
-rw-r--r-- | lib/Benchmark.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index 7cb78eb56e..5157aad4a0 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -423,14 +423,14 @@ sub timestr { my @t = @$tr; warn "bad time value (@t)" unless @t==6; my($r, $pu, $ps, $cu, $cs, $n) = @t; - my($pt, $ct, $t) = ($tr->cpu_p, $tr->cpu_c, $tr->cpu_a); + my($pt, $ct, $tt) = ($tr->cpu_p, $tr->cpu_c, $tr->cpu_a); $f = $defaultfmt unless defined $f; # format a time in the required style, other formats may be added here $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)", - @t,$t) if $style eq 'all'; + $r,$pu,$ps,$cu,$cs,$tt) if $style eq 'all'; $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)", |