Branch Coverage

blib/lib/HealthCheck/Diagnostic.pm
Criterion Covered Total %
branch 72 78 92.3


line true false branch
153 0 13 @params == 1 && (ref $params[0] || '') eq 'HASH' ? :
165 3 13 unless ref $_[0]
174 1 7 unless ref $_[0]
3 4 unless +(shift())->{'tags'}
182 0 5 unless ref $_[0]
190 0 5 unless ref $_[0]
243 0 45 @params == 1 && (ref $params[0] || '') eq 'HASH' ? :
246 2 43 unless $class_or_self->can('run')
252 5 38 exists $params{'summarize_result'} ? :
255 4 39 $params{'runtime'} ? :
257 1 42 if $@
259 27 16 if (@res == 1 and (ref $res[0] || '') eq 'HASH') { }
12 4 elsif (@res % 2 == 0) { }
266 4 39 if $start
268 4 39 unless $summarize
332 68 138 if (ref $self)
356 52 228 unless exists $statuses->{$status}
359 44 236 if (exists $result->{'results'})
360 40 4 if ((ref $result->{'results'} || '') eq 'ARRAY') { }
364 5 35 if (@results == 1 and $self->collapse_single_result)
375 3 1 defined $result->{'results'} ? :
387 10 89 if (exists $r->{'id'} and my $i = $seen_ids{$r->{'id'} // ''}++)
388 5 5 defined $r->{'id'} && length $r->{'id'} ? :
391 99 0 if (defined(my $s = $r->{'status'}))
393 4 95 if $s =~ /^[0-3]$/
397 36 63 if exists $statuses->{$s} and $statuses->{$s} < ($statuses->{$status} // 5)
404 259 16 if $status
408 75 200 if (exists $result->{'id'})
410 14 61 unless (defined $rid and $rid =~ /^[a-z0-9_]+$/)
411 10 4 defined $rid ? :
415 125 150 if (exists $result->{'timestamp'})
417 121 4 unless (defined $ts and $ts =~ /$rfc3339_timestamp/x)
418 121 0 defined $ts ? :
426 4 271 if (not exists $result->{'status'}) { }
1 270 elsif (not defined $result->{'status'}) { }
11 259 elsif (not exists $$statuses{uc($result->{'status'} // '')}) { }
437 6 269 unless defined $result->{'status'} and length $result->{'status'}
439 151 124 if (@errors)
444 135 15 if $result->{'status'} and $$statuses{$result->{'status'}} and $statuses->{'UNKNOWN'} < $$statuses{$result->{'status'}}