Branch Coverage

blib/lib/Mojolicious/Plugin/NYTProf.pm
Criterion Covered Total %
branch 45 62 72.5


line true false branch
165 87 1 if (my $nytprof = $config->{'nytprof'})
167 1 86 if $app->mode eq 'production' and not $nytprof->{'allow_production'}
171 1 85 if ($nytprofhtml_path = $nytprof->{'nytprofhtml_path'}) { }
178 1 85 unless $nytprofhtml_path and -e $nytprofhtml_path
187 0 170 unless (-d $dir)
188 0 0 unless mkdir $dir
195 4 81 unless ($nytprof->{'disable'})
219 0 92 unless (-e $nytprofhtml_path)
227 92 0 $nytprofhtml_path && -e $nytprofhtml_path ? :
254 693 1695 if ($pre_hook eq 'after_build_tx') { }
0 1695 elsif ($pre_hook =~ /around/u) { }
262 3 1692 if $c->stash->{'mojo.static'}
265 4 2381 if $path =~ m[^/nytprof]u
268 0 2381 if $^O eq 'MSWin32'
273 0 2381 if ($^O eq 'MSWin32' and length $profile > 259)
282 5 2376 unless $disable
283 0 2381 if $pre_hook =~ /around/u
288 11 2232 if $post_hook =~ /around/u
289 11 2232 unless $disable
312 1 1 @profiles ? :
325 1 1 unless $list =~ /No profiles found/u
346 0 7 unless opendir my $dirh, $prof_dir
370 7 1 $nytprof && $nytprof->attributes->{'profiler_duration'} ? :
387 1 1 unless -f $profile
394 1 2 unless (-d $sub_dir)
395 0 1 unless mkdir $sub_dir
402 1 0 unless (-f catfile($htmldir, 'index.html'))
405 0 1 if ($? == -1) { }
0 1 elsif ($? & 127) { }
0 1 elsif ($? != 0) { }
408 0 0 $? & 128 ? :