Revision: 1391
Author: [email protected]
Date: Tue Nov 9 14:58:56 2010
Log: Added --no-mergeevals option
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1391
Modified:
/trunk/Changes
/trunk/bin/nytprofhtml
/trunk/lib/Devel/NYTProf/Data.pm
/trunk/lib/Devel/NYTProf/Reader.pm
=======================================
--- /trunk/Changes Thu Nov 4 07:04:36 2010
+++ /trunk/Changes Tue Nov 9 14:58:56 2010
@@ -10,12 +10,13 @@
Improved handling of Class::MOP/Moose generated methods.
Improved handling of embedded filenames, e.g., "(eval N)[$path]"
+ Updated and clarified usecputime=1 docs.
+ Updated tests for new functionality in Sub::Name 0.06.
+ Added --no-mergeevals option to nytprofhtml.
Added "If Statement and Subroutine Timings Don't Match" and
"If Headline Subroutine Timings Don't Match the Called Subs"
sections to the DATA COLLECTION AND INTERPRETATION docs.
Added note to the docs re profiling applications that use Coro.
- Clarified usecputime=1 docs.
- Updated tests for new functionality in Sub::Name 0.06.
=head2 Changes in Devel::NYTProf 4.05 (svn 1359) 15th Sept 2010
=======================================
--- /trunk/bin/nytprofhtml Sun Sep 12 05:01:13 2010
+++ /trunk/bin/nytprofhtml Tue Nov 9 14:58:56 2010
@@ -69,6 +69,7 @@
'open!' => \my $opt_open,
'help|h' => sub { exit usage() },
'minimal|m!'=> \my $opt_minimal,
+ 'mergeevals!'=> \(my $opt_mergeevals = 1),
'profself!' => sub { }, # handled in BEGIN above
) or do { exit usage(); };
@@ -83,6 +84,7 @@
--delete, -d Delete any old report files in <dir> first
--lib <lib>, -l <lib> Add <lib> to the beginning of \...@inc
--minimal, -m Don't generate graphviz .dot files or
block/sub-level reports
+ --no-mergeevals Disable merging of string evals
--help, -h Print this message
This script of part of the Devel::NYTProf distribution.
@@ -119,7 +121,10 @@
$SIG{USR2} = \&Carp::cluck;
-my $reporter = new Devel::NYTProf::Reader($opt_file);
+my $reporter = new Devel::NYTProf::Reader($opt_file, {
+ quiet => 0,
+ skip_collapse_evals => !$opt_mergeevals,
+});
# place to store this
$reporter->output_dir($opt_out);
=======================================
--- /trunk/lib/Devel/NYTProf/Data.pm Thu Jul 8 03:48:58 2010
+++ /trunk/lib/Devel/NYTProf/Data.pm Tue Nov 9 14:58:56 2010
@@ -117,8 +117,10 @@
# Where a given eval() has been invoked more than once
# rollup the corresponding fids if they're "uninteresting".
- for my $fi ($profile->noneval_fileinfos) {
- $profile->collapse_evals_in($fi);
+ if ($args->{skip_collapse_evals}) {
+ for my $fi ($profile->noneval_fileinfos) {
+ $profile->collapse_evals_in($fi);
+ }
}
$profile->_clear_caches;
=======================================
--- /trunk/lib/Devel/NYTProf/Reader.pm Mon Oct 11 13:14:06 2010
+++ /trunk/lib/Devel/NYTProf/Reader.pm Tue Nov 9 14:58:56 2010
@@ -45,7 +45,7 @@
sub new {
my $class = shift;
my $file = shift;
- my $opts = shift;
+ my $opts = shift || {};
my $self = {
file => $file || 'nytprof.out',
@@ -80,7 +80,10 @@
};
bless($self, $class);
- $self->{profile} = Devel::NYTProf::Data->new({filename =>
$self->{file}});
+ $self->{profile} = Devel::NYTProf::Data->new({
+ %$opts,
+ filename => $self->{file},
+ });
return $self;
}
--
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]