Skip to content

Commit

Permalink
ux: By default display program runtime in secs, but module load time …
Browse files Browse the repository at this point in the history
…in ms
  • Loading branch information
sharyanto committed Jul 27, 2012
1 parent 36c16fd commit c0cfc43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Devel/EndStats.pm
Expand Up @@ -125,7 +125,7 @@ END {

if ($begin_success) {

$stats .= sprintf "# Program runtime duration: %.6fs\n", $secs;
$stats .= sprintf "# Program runtime duration: %.3fs\n", $secs;

my $files = 0;
my $lines = 0;
Expand Down Expand Up @@ -165,8 +165,8 @@ END {
for my $r (sort $sortsub keys %inc_info) {
next unless $inc_info{$r}{lines};
$inc_info{$r}{time} ||= 0;
$stats .= sprintf "# #%3d %5d lines %.6fs(%3d%%) %s (loaded by %s)\n",
$inc_info{$r}{order}, $inc_info{$r}{lines}, $inc_info{$r}{time}, $secs ? $inc_info{$r}{time}/$secs*100 : 0,
$stats .= sprintf "# #%3d %5d lines %7.3fms(%3d%%) %s (loaded by %s)\n",
$inc_info{$r}{order}, $inc_info{$r}{lines}, $inc_info{$r}{time}*1000, $secs ? $inc_info{$r}{time}/$secs*100 : 0,
$r, $inc_info{$r}{caller};
}
}
Expand Down

0 comments on commit c0cfc43

Please sign in to comment.