timbunce / devel-nytprof

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.)
http://blog.timbunce.org/tag/nytprof/
67 stars 51 forks source link

Reader coverage 20210330 #149

Closed jkeenan closed 3 years ago

jkeenan commented 3 years ago

The primary objective of the reader-coverage-20210330 branch is to increase the test suite's coverage of lib/Devel/NYTProf/Reader.pm.

This branch builds upon the document-util-20210329 branch which was focused on increasing the coverage of lib/Devel/NYTProf/Util.pm.

In the master branch (3a11238966af7de903567670603e75e974cb265b), currently looks like this:

$ $ cover -summary -coverage=stmt,bran,cond,sub

------------------------------------ ------ ------ ------ ------ ------
File                                   stmt   bran   cond    sub  total
------------------------------------ ------ ------ ------ ------ ------
blib/lib/Devel/NYTProf.pm               0.0    n/a    n/a    0.0    0.0
blib/lib/Devel/NYTProf/Constants.pm    60.0    0.0    n/a   80.0   51.6
blib/lib/Devel/NYTProf/Core.pm        100.0    n/a    n/a  100.0  100.0
blib/lib/Devel/NYTProf/Data.pm         74.1   56.2   56.1   85.0   67.5
blib/lib/Devel/NYTProf/FileInfo.pm     87.4   59.3   57.5   84.7   78.5
blib/lib/Devel/NYTProf/ReadStream.pm  100.0    n/a    n/a  100.0  100.0
blib/lib/Devel/NYTProf/Reader.pm       12.0    0.0    0.0   44.0    8.7
blib/lib/Devel/NYTProf/Run.pm          85.7   35.0   33.3  100.0   68.3
blib/lib/Devel/NYTProf/SubInfo.pm      80.9   52.1   53.1   66.6   69.4
blib/lib/Devel/NYTProf/Test.pm          n/a    n/a    n/a  100.0  100.0
blib/lib/Devel/NYTProf/Util.pm         75.0   51.4   36.3   88.2   66.1
Total                                  65.4   41.4   38.3   76.5   57.1
------------------------------------ ------ ------ ------ ------ ------

After the document-util-20210329 and reader-coverage-20210330 branches are merged, the coverage will look like this:

------------------------------------ ------ ------ ------ ------ ------
File                                   stmt   bran   cond    sub  total
------------------------------------ ------ ------ ------ ------ ------
blib/lib/Devel/NYTProf.pm               0.0    n/a    n/a    0.0    0.0
blib/lib/Devel/NYTProf/Constants.pm    60.0    0.0    n/a   80.0   51.6
blib/lib/Devel/NYTProf/Core.pm        100.0    n/a    n/a  100.0  100.0
blib/lib/Devel/NYTProf/Data.pm         74.5   59.2   59.3   87.5   69.1
blib/lib/Devel/NYTProf/FileInfo.pm     87.8   62.5   60.0   84.7   79.6
blib/lib/Devel/NYTProf/ReadStream.pm  100.0    n/a    n/a  100.0  100.0
blib/lib/Devel/NYTProf/Reader.pm       80.5   51.5   41.0  100.0   67.9
blib/lib/Devel/NYTProf/Run.pm          85.7   35.0   33.3  100.0   68.3
blib/lib/Devel/NYTProf/SubInfo.pm      87.4   64.1   61.7   76.1   77.7
blib/lib/Devel/NYTProf/Test.pm          n/a    n/a    n/a  100.0  100.0
blib/lib/Devel/NYTProf/Util.pm         97.3   80.8   72.7  100.0   90.8
Total                                  83.2   59.9   54.2   87.5   74.4
------------------------------------ ------ ------ ------ ------ ------

In particular:

Before:

blib/lib/Devel/NYTProf/Reader.pm       12.0    0.0    0.0   44.0    8.7
...
blib/lib/Devel/NYTProf/Util.pm         75.0   51.4   36.3   88.2   66.1

After:

blib/lib/Devel/NYTProf/Reader.pm       80.5   51.5   41.0  100.0   67.9
...
blib/lib/Devel/NYTProf/Util.pm         97.3   80.8   72.7  100.0   90.8