Author: gisle.aas
Date: Sat Oct 25 08:05:31 2008
New Revision: 551
Modified:
trunk/bin/nytprofhtml
trunk/lib/Devel/NYTProf/Reader.pm
Log:
Don't show filename for call refs to the same file.
Modified: trunk/bin/nytprofhtml
==============================================================================
--- trunk/bin/nytprofhtml (original)
+++ trunk/bin/nytprofhtml Sat Oct 25 08:05:31 2008
@@ -256,7 +256,7 @@
$reporter->set_param(
'column4',
{ func => sub {
- my ($value, $linenum, $linesrc, $profile, $subs, $calls) = @_;
+ my ($value, $linenum, $linesrc, $profile, $subs, $calls,
$thisfile) = @_;
$linesrc =~ s/&/&/g;
$linesrc =~ s/</</g;
@@ -301,9 +301,10 @@
my $filename = $profile->fid_filename($fid);
my $href =
$reporter->get_file_stats()->{$filename}{html_safe} || "unknown";
+ $filename = $filename eq $thisfile ? "" : " of $filename";
push @prologue,
- sprintf q{# %*s times%s%s at <a
href="%s#%d">line %d</a> of %s%s},
+ sprintf q{# %*s times%s%s at <a
href="%s#%d">line %d%s</a>%s},
length($max_calls), $count, $times,
$subname, "$href.html", $line, $line,
$filename, $avg_time;
$prologue[-1] =~ s/^(# +)1 times/$1 once/; # better
English
Modified: trunk/lib/Devel/NYTProf/Reader.pm
==============================================================================
--- trunk/lib/Devel/NYTProf/Reader.pm (original)
+++ trunk/lib/Devel/NYTProf/Reader.pm Sat Oct 25 08:05:31 2008
@@ -447,12 +447,12 @@
print OUT $func->(
$value, $totalsByLine{$LINE}->{$value},
$statistics{$value}, $LINE, $line, $profile,
$subs_defined,
- $makes_calls_to
+ $makes_calls_to, $filestr
);
}
else {
print OUT $func->(
- $value, $LINE, $line, $profile, $subs_defined,
$makes_calls_to
+ $value, $LINE, $line, $profile, $subs_defined,
$makes_calls_to, $filestr
);
}
next;
--~--~---------~--~----~------------~-------~--~----~
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]
-~----------~----~----~----~------~----~------~--~---