Branch Coverage

blib/lib/JMX/Jmx4Perl/Nagios/SingleCheck.pm
Criterion Covered Total %
branch 39 242 16.1


line true false branch
72 0 0 if $self->script
76 0 0 if ($self->alias)
78 0 0 unless $alias
83 0 0 if ($do_read) { }
0 0 elsif ($do_exec) { }
91 0 0 if ($method)
96 0 0 if ($self->base or $self->base_mbean)
97 0 0 unless (looks_like_number($self->base))
101 0 0 if ($self->base)
104 0 0 if ($alias) { }
107 0 0 $self->base_mbean ? :
110 0 0 unless $mbean
111 0 0 unless $attr
115 0 0 if $path
139 0 0 if $@
174 0 0 if (ref $request eq 'CODE') { }
185 0 0 if (defined $delta and not $script_mode)
187 0 0 unless (defined $value)
196 0 0 if ($self->base || $self->base_mbean and not $script_mode) { }
199 0 0 $base_value ? :
202 0 0 if ($self->_include_perf_data)
203 0 0 if ($self->perfdata and $self->perfdata =~ /^\s*\%\s*/) { }
208 0 0 $self->unit ? :
217 0 0 unless $code == 0
225 0 0 if ($self->_include_perf_data)
226 0 0 $self->unit ? :
233 0 0 unless $code == 0
246 0 0 unless defined $self->perfdata
256 0 0 if ($label)
269 0 0 if ($req->get('type') eq 'read' and $req->is_mbean_pattern) { }
279 0 0 if (defined $value) { }
280 0 0 if (&JSON::is_bool($value)) { }
0 0 elsif (ref $value and $self->string) { }
284 0 0 if (ref $value eq 'ARRAY') { }
294 0 0 defined $self->null ? :
302 0 0 if ref $val ne 'HASH'
304 0 0 if keys %$val != 1
306 0 0 unless ref $attr_val eq 'HASH'
307 0 0 if keys %$attr_val != 1
315 0 0 if (not $history) { }
320 0 0 if ($req->is_mbean_pattern) { }
325 0 0 unless (@$hist_val)
333 0 0 if ($delta) { }
336 0 0 $time_delta ? :
347 0 0 $target ? :
361 0 0 if (looks_like_number $name)
367 0 0 if $$resp{'error'}
400 59 13 unless $$units[$i] eq $unit
403 8 5 if (abs $ret > 1) { }
405 2 6 if $i == $#{$units;}
407 6 6 if (abs $ret / $UNITS{$$units[$j]} >= 1) { }
416 0 5 if $i == 0
418 5 3 if ($ret < 1) { }
435 0 0 if ($value =~ /\de/i)
444 0 0 if ($resp->is_error)
446 0 0 if ($np->opts->{'verbose'})
448 0 0 ref $stacktrace eq 'ARRAY' ? :
0 0 if $stacktrace
453 0 0 if (not $req->is_mbean_pattern and (ref $resp->value and not $self->string) and not &JSON::is_bool($resp->value))
464 1 0 unless ($name)
465 1 0 if ($self->name) { }
469 0 0 if ($self->alias) { }
470 0 0 $self->path ? :
473 0 0 if ($val) { }
477 0 0 $self->path ? :
483 0 1 if ($$args{'cleanup'})
499 0 0 if ($self->alias) { }
0 0 elsif ($self->value) { }
501 0 0 unless @req_args > 0
502 0 0 if ($self->path)
503 0 0 @req_args == 2 ? :
523 0 0 if defined $config_args and !ref($config_args) eq 'ARRAY'
525 0 0 if ($config_args) { }
530 0 0 defined $cli_arg ? :
535 0 0 if ($self->alias) { }
537 0 0 unless @req_args >= 2
557 0 0 @ret ? :
565 0 0 if ($self->numeric or $self->string) { }
566 0 0 $self->numeric ? :
570 0 0 if ($numeric_check) { }
572 0 0 defined $self->critical ? :
0 0 defined $self->warning ? :
578 0 0 @ths ? :
581 0 0 $value =~ /^true|false$/i ? :
591 0 0 unless $check_value
592 0 0 if ($check_value =~ /^\s*qr(.)(.*)\1\s*$/)
593 0 0 $value =~ /$2/ ? :
595 0 0 if ($check_value =~ s/^\!//) { }
596 0 0 $value ne $check_value ? :
598 0 0 $value eq $check_value ? :
607 0 0 if $v
619 0 1 if $self->label
623 0 1 if ($code == 2 or $code == 1) { }
624 0 0 if ($self->base or $self->base_mbean) { }
629 0 0 if ($mode ne 'numeric') { }
637 0 1 if ($self->base or $self->base_mbean) { }
641 0 1 if ($mode ne 'numeric') { }
654 1 0 if ($c eq 'v') { }
659 1 0 $val =~ /\./ ? :
680 3 4 if ($p =~ /^(\%[\w\.\-]*)(\w)$/) { }
682 0 3 if ($what eq 'r' or $what eq 'q') { }
0 3 elsif ($what eq 'b') { }
1 2 elsif ($what eq 'u' or $what eq 'w') { }
0 2 elsif ($what eq 'f') { }
1 1 elsif ($what eq 'v') { }
0 1 elsif ($what eq 't') { }
0 1 elsif ($what eq 'c') { }
1 0 elsif ($what eq 'n') { }
0 0 elsif ($what eq 'd') { }
0 0 elsif ($what eq 'y') { }
0 0 elsif ($what eq 'z') { }
684 0 0 $what eq 'r' ? :
697 0 0 $code == 1 ? :
0 0 $code == 2 ? :
698 0 0 defined $val ? :
714 0 1 if ($$args{'prefix'}) { }
727 0 1 if ($mode ne 'numeric') { }
735 1 0 $val =~ /\./ ? :
778 9 0 if ($$CHECK_CONFIG_KEYS{$name}) { }
779 6 3 if defined $np->opts->{$name}
780 0 3 if ($$self{'config'}) { }