Branch Coverage

blib/lib/HealthCheck/Diagnostic.pm
Criterion Covered Total %
branch 79 86 91.8


line true false branch
159 0 13 @params == 1 && (ref $params[0] || '') eq 'HASH' ? :
171 3 14 unless ref $_[0]
180 1 102 unless ref $_[0]
51 51 unless +(shift())->{'tags'}
188 0 59 unless ref $_[0]
196 0 43 unless ref $_[0]
204 0 45 unless ref $_[0]
257 0 47 @params == 1 && (ref $params[0] || '') eq 'HASH' ? :
260 2 45 unless $class_or_self->can("run")
266 5 40 exists $params{'summarize_result'} ? :
269 4 41 $params{'runtime'} ? :
271 1 44 if $@
273 28 17 if (@res == 1 and (ref $res[0] || '') eq 'HASH') { }
13 4 elsif (@res % 2 == 0) { }
280 4 41 if $start
282 4 41 unless $summarize
346 71 138 if (ref $self)
347 23 32 $_ eq 'tags' ? :
349 70 99 $_ eq 'tags' ? :
169 22 if not exists $target->{$_}
374 54 230 unless exists $statuses->{$status}
377 45 239 if (exists $result->{'results'})
378 41 4 if ((ref $result->{'results'} || '') eq 'ARRAY') { }
382 5 36 if (@results == 1 and $self->collapse_single_result)
393 3 1 defined $result->{'results'} ? :
405 10 91 if (exists $r->{'id'} and my $i = $seen_ids{$r->{'id'} // ""}++)
406 5 5 defined $r->{'id'} && length $r->{'id'} ? :
409 101 0 if (defined(my $s = $r->{'status'}))
411 4 97 if $s =~ /^[0-3]$/
415 37 64 if exists $statuses->{$s} and $statuses->{$s} < ($statuses->{$status} // 5)
422 262 17 if $status
426 79 200 if (exists $result->{'id'})
428 14 65 unless (defined $rid and $rid =~ /^[a-z0-9_]+$/)
429 10 4 defined $rid ? :
433 125 154 if (exists $result->{'timestamp'})
435 121 4 unless (defined $ts and $ts =~ /$rfc3339_timestamp/)
436 121 0 defined $ts ? :
444 5 274 if (not exists $result->{'status'}) { }
1 273 elsif (not defined $result->{'status'}) { }
11 262 elsif (not exists $$statuses{uc($result->{'status'} // '')}) { }
455 7 272 unless defined $result->{'status'} and length $result->{'status'}
457 152 127 if (@errors)
462 135 16 if $result->{'status'} and $$statuses{$result->{'status'}} and $statuses->{'UNKNOWN'} < $$statuses{$result->{'status'}}