Devel::NYTProf is a powerful feature-rich source code profiler for Perl. (Mostly in maintenance mode, so PRs are much more likely to be acted upon than Issues.)
This pull request focuses on improvements in test coverage, primarily to lib/Devel/NYTProf/Data.pm. Most new tests are found in t/12-data.t. t/nytprof_11-data.out.txt was cloned to t/nytprof_12-data.out.txt to provide test data for this new test file.
Coverage analysis exposed some code that was duplicative and some that was not needed. Two subroutines in Data.pm have been deactivated by being commented out. They will be deleted altogether in a future release. Those subroutines were:
packages_at_depth_subinfo(): Added in commit eafe0d6787a6ab04e5f6a9575234f0a527d45d68 (Nov 28 2008) but apparently never tested or exercised within the code base.
package_fids(): Has not been exercised within the code base since 4e66f2060d774cec1224bd4869b1242fd41b738f (Dec 04 2008).
A search at grep.metacpan.org suggests that these subs have never been used outside this distro.
The definition of helper sub _dumper() was moved from lib/Devel/NYTProf/Data.pm to lib/Devel/NYTProf/Util.pm.
When the test suite is run through Devel::Cover once without a trace level and then once with NYTPROF_TEST=trace=5, coverage grows to:
This pull request focuses on improvements in test coverage, primarily to
lib/Devel/NYTProf/Data.pm
. Most new tests are found int/12-data.t
.t/nytprof_11-data.out.txt
was cloned tot/nytprof_12-data.out.txt
to provide test data for this new test file.Coverage analysis exposed some code that was duplicative and some that was not needed. Two subroutines in Data.pm have been deactivated by being commented out. They will be deleted altogether in a future release. Those subroutines were:
packages_at_depth_subinfo()
: Added in commit eafe0d6787a6ab04e5f6a9575234f0a527d45d68 (Nov 28 2008) but apparently never tested or exercised within the code base.package_fids()
: Has not been exercised within the code base since 4e66f2060d774cec1224bd4869b1242fd41b738f (Dec 04 2008).A search at grep.metacpan.org suggests that these subs have never been used outside this distro.
The definition of helper sub
_dumper()
was moved fromlib/Devel/NYTProf/Data.pm
tolib/Devel/NYTProf/Util.pm
.When the test suite is run through Devel::Cover once without a trace level and then once with
NYTPROF_TEST=trace=5
, coverage grows to:(See here for a display of where we started out coverage-wise in release 6.06.)