Branch Coverage

blib/lib/HealthCheck/Diagnostic/RabbitMQ.pm
Criterion Covered Total %
branch 46 50 92.0


line true false branch
19 0 7 @params == 1 && (ref $params[0] || '') eq 'HASH' ? :
48 19 11 if (defined $params{'queue'} or ref $self and defined $self->{'queue'})
63 22 104 ref $self ? :
56 126 exists $params{$param} ? :
74 9 21 if (ref $rabbit_mq eq "CODE")
80 1 8 if ($@)
85 9 20 unless $rabbit_mq and do { local $@; eval { do { local $SIG{'__DIE__'}; $rabbit_mq->can($method) } } }
95 0 20 ref $self && exists $self->{'should_disconnect'} ? :
0 20 exists $params{'should_disconnect'} ? :
104 16 4 if exists $decision_params{'channel'}
115 2 14 unless $res->{'data'}
16 4 if %decision_params
128 16 4 if (defined $params{'queue'})
151 0 16 if $params{'should_disconnect'}
154 4 16 if (my $e = $@)
164 14 2 if (defined $data->{'listeners'})
166 4 10 if (defined $params{'listeners_max_critical'} and $params{'listeners_max_critical'} <= $listeners or defined $params{'listeners_min_critical'} and $params{'listeners_min_critical'} >= $listeners) { }
2 14 elsif (defined $params{'listeners_max_warning'} and $params{'listeners_max_warning'} <= $listeners or defined $params{'listeners_min_warning'} and $params{'listeners_min_warning'} >= $listeners) { }
177 2 2 if defined $min
178 2 2 if defined $max
193 1 1 if defined $min
194 1 1 if defined $max
199 10 6 if ($res{'status'} ne "CRITICAL" and defined $data->{'messages'})
201 2 8 if (defined $params{'messages_critical'} and $params{'messages_critical'} <= $messages) { }
1 12 elsif (defined $params{'messages_warning'} and $params{'messages_warning'} <= $messages) { }