t/test70-subexcl.p

filter: Statementstmt 100% 8 / 8 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 86.6% 13 / 15 CC 1 SCAR 0.0
CC
1
Cov
90%
A
1.0
B
1.0
C
1.0
CRAP 1.0
« blib/lib/Devel/NYTProf/Test.pm ↑ Summary t/test14.pm »
1 # This test isn't very useful until we can test subroutine timings
2 # perhaps by adding an option to nytprofcsv to include them
3 # and adjusting test.pl to test for them (including the ~N fudge factor).
4 # Meanwhile the test is useful for sanity checking the subroutine timing
5 # code using a command like
6 # make && NYTPROF_TEST=trace=3 perl -Mblib test.pl -leave=1 -use_db_sub=0 t/test70-subexcl.*
7  
8 16 ▶my $T = $ENV{NYTPROF_TEST_PAUSE_TIME} || 0.2;
Condition50%1/2
$ENV{'NYTPROF_TEST_PAUSE_TIME'} || 0.2
l!l
016
MC/DC0%0/1
$ENV{'NYTPROF_TEST_PAUSE_TIME'} || 0.2
$ENV{'NYTPROF_TEST_PAUSE_TIME'}
Truth table50%1/2
A
A= $ENV{'NYTPROF_TEST_PAUSE_TIME'}
Aresult
11
00
9  
10 32 ▶sub A { # inclusive ~= $T, exclusive ~= $T
Subroutine A: called CC=1 SCAR=0.0
11 32 select undef, undef, undef, $T;
12 }
13  
14 32 ▶sub B { # inclusive ~= $T*2, exclusive ~= $T
Subroutine B: called CC=1 SCAR=0.0
15 32 A();
16 32 select undef, undef, undef, $T;
17 }
18  
19 32 ▶sub C { # inclusive ~= $T*2, exclusive ~= 0.0
Subroutine C: called CC=1 SCAR=0.0
20 32 B();
21 }
22  
23 16 ▶sub D { # inclusive ~= $T*4, exclusive ~= 0.0
Subroutine D: called CC=1 SCAR=0.0
24 16 C();
25 16 C(); # cumulative_subr_secs non-zero on sub entry
26 }
27  
28 16 D();
« blib/lib/Devel/NYTProf/Test.pm ↑ Summary t/test14.pm »