Branch Coverage

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


line true false branch
155 87 1 if (my $nytprof = $config->{'nytprof'})
157 1 86 if $app->mode eq 'production' and not $nytprof->{'allow_production'}
161 1 85 if ($nytprofhtml_path = $nytprof->{'nytprofhtml_path'}) { }
168 1 85 unless $nytprofhtml_path and -e $nytprofhtml_path
177 0 170 unless (-d $dir)
178 0 0 unless mkdir $dir
185 4 81 unless ($nytprof->{'disable'})
209 0 92 unless (-e $nytprofhtml_path)
217 92 0 $nytprofhtml_path && -e $nytprofhtml_path ? :
244 693 1695 if ($pre_hook eq 'after_build_tx') { }
0 1695 elsif ($pre_hook =~ /around/) { }
252 3 1692 if $c->stash->{'mojo.static'}
255 4 2381 if $path =~ m[^/nytprof]
258 0 2381 if $^O eq 'MSWin32'
263 0 2381 if ($^O eq 'MSWin32' and length $profile > 259)
272 5 2376 unless $disable
273 0 2381 if $pre_hook =~ /around/
278 11 2232 if $post_hook =~ /around/
279 11 2232 unless $disable
302 1 1 @profiles ? :
315 1 1 unless $list =~ /No profiles found/
336 0 7 unless opendir my $dirh, $prof_dir
360 7 1 $nytprof && $nytprof->attributes->{'profiler_duration'} ? :
377 1 1 unless -f $profile
384 1 2 unless (-d $sub_dir)
385 0 1 unless mkdir $sub_dir
392 1 0 unless (-f catfile($htmldir, 'index.html'))
395 0 1 if ($? == -1) { }
0 1 elsif ($? & 127) { }
0 1 elsif ($? != 0) { }
398 0 0 $? & 128 ? :