Branch Coverage

File:blib/lib/Database/BI/Alert.pm
Coverage:53.4%

line%coveragebranch
10050TFunless ref $canvas eq "HASH"
10150TFref $canvas->{'measures'} eq 'ARRAY' ? :
10250TFunless (@measures)
111100TFref $canvas->{'alerts'} eq 'HASH' ? :
112100TFref $alerts->{'thresholds'} eq 'ARRAY' ? :
11350TFunless defined $t->{'fn'} and defined $t->{'measure'} and not $have{$t->{'measure'}}++
11650TFwantarray ? :
14350TFunless ref $measures eq "ARRAY"
14450TFunless ref $records eq "ARRAY"
15050TFunless length $alias
15250TFref $_ eq 'HASH' ? :
154100TFif ($fn eq 'count') { }
50TFelsif ($fn eq 'count_distinct') { }
16050TFif defined $_
16150TFif ($fn eq 'sum') { }
0TFelsif ($fn eq 'avg') { }
0TFelsif ($fn eq 'min') { }
0TFelsif ($fn eq 'max') { }
16250TF@nums ? :
1640TF@nums ? :
1660TFif (@nums)
1670TF$_ < $v ? :
1710TFif (@nums)
1720TF$_ > $v ? :
216100TF$a{'multi'} ? :
22350TFunless exists $OPS{$op}
232100TFif ($OPS{$op}->($actual, $tval)) { }
233100TF$entry ? :
238100TFif (not $suppress && $last_alert or $now - $last_alert >= $suppress) { }
242100TFif $suppress
244100TFif ($a{'keep'})
246100TF$entry && ($entry->{'since'} // 0) ? :
270100TFif ($entry)
272100TFif ($a{'recovery'}) { }
309100TFunless defined $text and length $text
311100TFunless defined $value
354100TFunless -f $path
35750TFunless defined $json
360100TFunless (ref $state eq "HASH" and ref $state->{'alerts'} eq "HASH")
37450TFunless defined $path and length $path
37650TFlength $dirs ? :
37750TFunless (-d $dir)
3790TFunless -d $dir
38250TFunless $fh
38650TFunless close $fh
38750TFunless rename $tmp, $path
39050TFunless ($ok)
3920TFif defined $fh
3930TFif defined $tmp
422100TFunless defined $path and -f $path
42450TFunless defined $json
42650TFunless ref $data eq "HASH" and ref $data->{'events'} eq "ARRAY"
43250TFunless ref $crossings eq "ARRAY"
43350TFunless ref $recoveries eq "ARRAY"
43650TFunless @new
43850TFif @all > $LOG_MAX
4550TFunless open $kept, "<&", \*STDIN
4580TFif (open STDIN, "<", $file)
4620TFif $kept
4630TFdefined $pid && $pid > 0 ? :
48150TFunless $fh
48450TFunless ($written)
49550TF$^O eq 'MSWin32' ? :
50150TF$^O eq 'MSWin32' ? :
50250TFif (not defined $pid) { }
100TFelsif ($pid == 0) { }
50750TFunless open STDIN, "<", $file
5080TFunless exec "/bin/sh", "-c", $a{'command'}
511100TFif ($a{'timeout'}) { }
515100TFif (&Time::HiRes::time() > $until)
531100TFif $status == 0
53350TF$status & 127 ? :
50TF$status == -1 ? :