Branch Coverage

blib/lib/Devel/NYTProf/Data.pm
Criterion Covered Total %
branch 126 150 84.0


line true false branch
81 1 675 unless -f $file
84 662 13 unless $args->{'quiet'}
91 1 674 if $args->{'callback'}
93 661 13 unless $args->{'quiet'}
102 1750 674 if $_
116 3104 3060 if $_->calls
117 112 562 if (@homeless_subs)
127 673 1 unless ($args->{'skip_collapse_evals'})
140 1 673 if (my $env = $ENV{'NYTPROF_ONLOAD'})
142 1 0 if $onload{'dump'}
143 0 1 if defined $onload{'exit'}
162 376 176 if @$siblings == 1
168 164 284 unless ($key)
169 16 148 if $fi->has_evals
170 60 104 if $fi->subs_defined
175 0 176 if (trace_level() >= 2)
197 0 176 if (values %src_keyed > $max_evals_siblings) { }
204 0 208 if @$src_same_fis == 1
207 16 192 if (grep {$_->has_evals(0);} @$src_same_fis) { }
208 0 16 if trace_level() >= 3
211 0 192 if trace_level() >= 3
241 0 0 $si2 ? :
0 128 if $si2 != $si or $si2->subname ne $subname
265 24 12 if ($nested_pkgs) { }
278 12 24 if $merge_subs
311 2 7700 unless (defined $arg)
312 1 1 unless $silent_if_undef
317 4 3 if ref $arg and UNIVERSAL::can($arg, "fid") and $arg->isa("Devel::NYTProf::FileInfo")
320 4 7692 unless ($fid)
326 480 7212 unless defined $fi->fid
334 1 257 unless (defined $subname)
339 2 255 unless my $si = $self->{'sub_subinfo'}{$subname}
395 27936 156 if (my $hook = $args->{'skip_fileinfo_hook'})
398 1120 26816 if ($path->[0] eq "fid_fileinfo" and @$path == 2)
402 160 960 unless $fi->fid
409 2432 0 if ($path->[0] eq "sub_subinfo" and @$path == 2 and $value->[0])
411 192 2240 if not $fi or &$hook($fi, $path, $value)
415 3264 23360 if ($path->[0] =~ /^fid_\w+_time$/ and @$path == 2)
417 528 2736 if not $fi or &$hook($fi, $path, $value)
433 2250 4542 $is_hash ? :
438 6780 12 if ($separator) { }
448 12 6780 if $start
452 450 49356 if $key eq "fid_srclines"
454 14634 34722 $is_hash ? :
457 21264 13458 unless $is_hash or defined $value
459 0 13458 if not $is_hash and ref $value eq "ARRAY" and not @$value
462 28092 0 if ($callback)
464 880 27212 unless $dump_opts
469 3214 23998 if (UNIVERSAL::can($value, 'dump')) { }
478 23998 0 unless (defined $as_compact)
483 10390 13608 unless ref $value eq "ARRAY"
485 9066 14932 if ($as_compact) { }
6342 8590 elsif (ref $value) { }
487 18132 0 defined $_ ? :
498 12 6780 if $end
555 449 2 if ($normalize_options)
568 6763 453 if exists $attributes->{$attr}
581 3273 1353 if $of_fid
590 32 2418 if ($newname ne $subname)
592 0 32 if $sub_subinfo->{$newname}
606 24204 10287 unless $line_data
611 0 10287 if (my $eval_lines = $line_data->[2])
651 0 38 if $incl_lines
653 0 38 unless my $fi = $self->fileinfo_of($fid)
660 5 33 if $caches->{$cache_key}
705 1 73 unless my $sub_subinfo = $self->subinfo_of($sub)
709 0 73 unless $fid
711 0 73 unless my $fileinfo = $fid && $self->fileinfo_of($fid)
736 1 7697 unless defined $file
741 54 7643 if exists $resolve_fid_cache->{$file}
744 7638 5 if $file =~ /^\d+$/
749 0 5 if $file =~ s/\.pmc$/.pm/
753 1 4 if $file =~ m[^/]
759 0 4 if @matches == 1
761 0 4 if @matches >= 2