Condition Coverage

blib/lib/MogileFS/ConnectionPool.pm
Criterion Covered Total %
condition 17 28 60.7


and 3 conditions

line !l l&&!r l&&r condition
65 5 0 5 not defined $r and $!{'EAGAIN'}
215 0 15 0 $self->{'total_inflight'} < $total_capacity and $i <= scalar(@$queue) - 1
340 8 1 0 $inflight_cb and not $valid

or 2 conditions

line l !l condition
16 1 0 $opts ||= {}
34 1 0 $self->{'total_capacity'} ||= 20
96 8 2 $self->{'inflight'}{$key} ||= {}
256 9 2 $self->{'idle'}{$key} ||= []
375 15 0 $self->{'inflight'}{$conn->key} ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
37 0 1 0 $self->{'dest_capacity'} ||= $self->{'total_capacity'}
228 5 15 0 $self->{'scheduled'} ||= 'Danga::Socket'->AddTimer(0, sub { $self->{'scheduled'} = undef; my $queue = $self->{'queue'}; my $total_capacity = $self->{'total_capacity'}; my $i = 0; while ($self->{'total_inflight'} < $total_capacity and $i <= scalar(@$queue) - 1) { my($ip, $port, $cb) = @{$queue->[$i];}; my $conn = $self->_conn_get($ip, $port); if ($conn) { splice @$queue, $i, 1; $self->_conn_run($conn, $cb); } else { ++$i; } ; } ; } )
465 3 0 28 not $old_timer or $expiry < $next_expiry