Condition Coverage

blib/lib/Monitoring/GLPlugin.pm
Criterion Covered Total %
condition 32 140 22.8


and 3 conditions

line !l l&&!r l&&r condition
47 0 0 0 $self->opts->can('blacklist') and $self->opts->blacklist
0 0 0 $self->opts->can('blacklist') and $self->opts->blacklist and -f $self->opts->blacklist
323 1 0 0 $self->opts->name and $self->opts->name =~ /(%22)|(%27)/
332 0 0 0 defined $_->{'alias'} and grep {$self->opts->mode eq $_;} @{$$_{'alias'};}
340 0 1 0 $self->opts->can('statefilesdir') and not $self->opts->statefilesdir
359 0 1 0 $self->opts->can('warningx') and $self->opts->warningx
365 0 1 0 $self->opts->can('criticalx') and $self->opts->criticalx
414 130 0 0 $self->get_variable('verbose') and $self->get_variable('verbose') > $self->get_variable('verbosity', 10)
532 0 0 0 defined $self->{$_} and ref $self->{$_} ne 'ARRAY'
539 0 0 0 defined $self->{$_} and ref $self->{$_} eq 'ARRAY'
553 0 0 0 UNIVERSAL::can($obj, 'isa') and $obj->can('dump')
684 0 0 0 $password and $password =~ m[^rfc3986://(.*)]
841 0 0 0 $level == 3 and $self->{'failed'} == 0
924 0 31 0 exists $self->{'blacklisted'} and $self->{'blacklisted'}
1017 10 21 0 $self->opts->lookback and $self->opts->lookback == 99999
31 0 0 $self->opts->lookback and $self->opts->lookback == 99999 and $params{'freeze'} == 0
10 21 0 $self->opts->lookback and $self->opts->lookback == 99999
31 0 0 $self->opts->lookback and $self->opts->lookback == 99999 and $params{'freeze'} == 1
10 21 0 $self->opts->lookback and $self->opts->lookback == 99999
31 0 0 $self->opts->lookback and $self->opts->lookback == 99999 and $params{'freeze'} == 2
1141 0 0 20 exists $last_values->{$_} && defined $last_values->{$_}
20 0 0 not exists $last_values->{$_} && defined $last_values->{$_} and exists $params{'lastarray'}
0 20 0 exists $last_values->{$_} and not defined $last_values->{$_}
1263 0 0 0 ref $validfunc ne 'CODE' and $validfunc eq 'percent'
0 0 0 ref $validfunc ne 'CODE' and $validfunc eq 'positive'
1303 0 31 0 ref $params{'save'} eq 'HASH' and exists $params{'save'}{'timestamp'}
1382 0 0 0 join '/', @dirs and not -d join('/', @dirs)

or 2 conditions

line l !l condition
381 0 1 $handler ||= sub { printf "UNKNOWN - %s timed out after %d seconds\n", $Monitoring::GLPlugin::plugin->{'name'}, $self->opts->timeout; exit 3; }
752 0 2 $envparams ||= []
896 0 0 $code ||= 2
897 0 0 $code ||= 1
898 0 0 $code ||= 3
982 0 0 $separator ||= ' '
993 0 0 $separator ||= ' '

or 3 conditions

line l !l&&r !l&&!r condition
284 1 0 0 grep({$self->opts->mode eq $_;} map({$_->{'spec'};} @{$$Monitoring::GLPlugin::plugin{'modes'};})) || grep({$self->opts->mode eq $_;} map({defined $_->{'alias'} ? @{$_->{'alias'};} : ();} @{$$Monitoring::GLPlugin::plugin{'modes'};}))
376 0 1 0 $timeout ||= $self->opts->timeout
542 0 0 0 ref $obj ne 'HASH' or not exists $obj->{'flat_indices'}
765 2 0 0 grep({$self->opts->mode eq $_;} map({$_->{'spec'};} @{$$Monitoring::GLPlugin::plugin{'modes'};})) || grep({$self->opts->mode eq $_;} map({defined $_->{'alias'} ? @{$_->{'alias'};} : ();} @{$$Monitoring::GLPlugin::plugin{'modes'};}))
777 0 0 0 $message ||= $self->{'info'}
783 0 0 0 $message ||= $self->{'info'}
789 0 0 0 $message ||= $self->{'info'}
795 0 0 0 $message ||= $self->{'info'}
837 31 0 0 $message ||= $self->{'info'}
1040 26 5 0 $self->load_state(%params) || eval { do { my $empty_events = {}; foreach $_ (@keys) { if (ref $self->{$_} eq 'ARRAY') { $empty_events->{$_} = []; } else { $empty_events->{$_} = 0; } ; } ; $empty_events->{'timestamp'} = 0; if ($mode eq 'lookback') { $empty_events->{'lookback_history'} = {}; } elsif ($mode eq 'lookback_freeze_chill') { $empty_events->{'cold'} = {}; $empty_events->{'frozen'} = {}; } ; $empty_events } }
1117 14 37 0 $mode eq 'normal' or $mode eq 'lookback'
51 0 0 $mode eq 'normal' or $mode eq 'lookback' or $mode eq 'lookback_freeze_chill'
1141 20 0 0 exists $last_values->{$_} && defined $last_values->{$_} || exists $params{'lastarray'}
1224 0 31 0 $@ or not -w $self->statefilesdir
1267 0 0 0 $value < 0 || $value > 100