Branch Coverage

blib/lib/Devel/NYTProf/Reader.pm
Criterion Covered Total %
branch 77 134 57.4


line true false branch
94 1 3 if (not exists $self->{$param}) { }
98 1 2 unless defined $value
108 1 14 if (ref $value eq "CODE")
119 4 0 unless -f $file
127 0 1 unless open OUT, ">", "$self->{'output_dir'}/$fname"
136 1 1 unless defined $dir
137 1 0 unless (mkdir $dir)
138 0 1 if !$! =~ /exists/
154 0 3 unless $opts->{'quiet'}
158 0 3 if $level_additional_sub
165 5 7 if @_
171 1 9 unless $fi
183 9 0 if length $fname > $max_len
184 0 9 if length $fname > $max_len
188 9 0 if $level
201 0 3 unless my(@all_fileinfos) = $profile->all_fileinfos
205 2 1 if ($LEVEL ne "line")
215 0 3 if ($opts{'show_progress'})
243 12 0 if $_ < 65536
255 0 3 if trace_level() >= 4 or $max_linenum > 32768
268 9 51 if (my $subdefs = delete $subdefs_at_line->{$linenum})
272 27 33 if (my $subcalls = delete $subcalls_at_line->{$linenum})
283 0 60 if (my $evalcalls = delete $evals_at_line->{$linenum})
297 21 39 if (my $stmts = $lines_array->[$linenum])
298 0 21 unless @$stmts
322 0 0 if trace_level() >= 3 and $stats_by_line{$linenum}
325 0 3 if %$subdefs_at_line
327 0 3 if %$subcalls_at_line
329 0 3 if %$evals_at_line
334 3 0 $runningTotalCalls ? :
359 0 3 unless open OUT, ">", "$self->{'output_dir'}/$fname"
368 0 3 if not $fi->has_savesrc and $self->file_has_been_modified($filestr)
373 0 3 if $profile->{'attribute'}{'sawampersand_fid'} and $fi->fid == $profile->{'attribute'}{'sawampersand_fid'}
376 0 3 if $fi->meta->{'merged_fids'}
382 3 0 unless ($src_lines)
385 0 3 if ($fi->is_fake) { }
0 3 elsif ($fi->is_eval) { }
0 3 elsif ($filestr =~ m[^/loader/0x[0-9a-zA-Z]+/]) { }
0 3 elsif (not $fi->is_file) { }
401 0 3 unless $filestr =~ m[t/test01\.p$]
405 0 3 if ($filestr =~ m[/(accessor .*) defined at /]) { }
0 3 elsif ($filestr =~ m[/(generated method \(unknown origin\))]) { }
414 0 3 if $filestr ne "-e" and not $filestr =~ m[^/] and not our $_generate_report_inc_hint++
422 0 3 if ($msg or $hint)
425 0 0 unless our $_generate_report_filestr_warn->{$filestr}++
440 0 3 if $src_undefs
449 0 3 if (my $z = $stats_by_line{'0'})
451 0 0 if (trace_level())
455 0 0 if (my $i = $z->{'subdef_info'})
462 0 0 if (my $i = $z->{'subcall_info'})
473 0 3 unless my $line_sub = $self->{'mk_report_source_line'}
487 0 45 if ($line =~ /^\# \s* line \s+ (\d+) \b/x)
492 0 0 unless our $line_directive_warn->{$filestr}++
497 9 36 $skip_blanks ? :
503 9 36 if ($skip_blanks)
522 0 3 unless $line_sub = $self->{'mk_report_xsub_line'}
528 12 6 if $kind eq "perl"
529 3 3 if $subinfo->calls == 0
531 0 3 if ($separator_sub)
549 0 3 if $opts{'show_progress'}
555 0 11 unless $file
560 0 4 if $fi->is_eval
564 8 3 if defined $anchor
570 3 0 if $url
580 0 8 unless $file
581 2 6 unless ($first)
591 4 0 if $url