Revision: 1287
Author: [email protected]
Date: Mon Jun 7 16:27:22 2010
Log: Only run mk_report_separator_line is there's something to follow.
Indent "includes %s spent executing %d call%s to %d sub%s defined therein"
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1287
Modified:
/trunk/bin/nytprofhtml
/trunk/lib/Devel/NYTProf/Reader.pm
=======================================
--- /trunk/bin/nytprofhtml Mon Jun 7 15:14:07 2010
+++ /trunk/bin/nytprofhtml Mon Jun 7 16:27:22 2010
@@ -599,8 +599,8 @@
my $sub_count = @subs_defined;
my $call_count = sum map { $_->calls } @subs_defined;
my $excl_time = sum map { $_->excl_time } @subs_defined;
- $extra .= sprintf "<br /># includes %s spent executing %d
call%s to %d sub%s defined therein.",
- fmt_time($excl_time, 2),
+ $extra .= sprintf "<br />%s# includes %s spent
executing %d call%s to %d sub%s defined therein.",
+ $ws, fmt_time($excl_time, 2),
$call_count, ($call_count != 1) ? 's' : '',
$sub_count, ($sub_count != 1) ? 's' : ''
if $call_count;
=======================================
--- /trunk/lib/Devel/NYTProf/Reader.pm Mon Jun 7 07:15:27 2010
+++ /trunk/lib/Devel/NYTProf/Reader.pm Mon Jun 7 16:27:22 2010
@@ -451,9 +451,7 @@
$LINE++;
}
- if (my $line_sub = $self->{mk_report_separator_line}) {
- print OUT $line_sub->($profile, $fi);
- }
+ my $separator_sub = $self->{mk_report_separator_line};
# iterate over xsubs
$line_sub = $self->{mk_report_xsub_line}
@@ -466,6 +464,11 @@
next if $kind eq 'perl';
next if $subinfo->calls == 0;
+ if ($separator_sub) {
+ print OUT $separator_sub->($profile, $fi);
+ undef $separator_sub; # do mk_report_separator_line just
once
+ }
+
print OUT $line_sub->(
$subname,
"sub $subname; # $kind\n\t",
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]