Branch Coverage

blib/lib/MogileFS/ConnectionPool.pm
Criterion Covered Total %
branch 34 74 45.9


line true false branch
47 2 13 unless my $idle = $$self{'idle'}{$key}
58 0 10 unless my $sock = $conn->sock
65 5 5 if not defined $r and $!{'EAGAIN'}
68 5 0 if (defined $r)
69 5 0 if ($r == 0) { }
97 0 10 if $nr_inflight >= $$self{'dest_capacity'}
100 0 10 if ($self->_total_connections >= $$self{'total_capacity'})
102 0 0 if ($$self{'total_inflight'} < $$self{'total_capacity'}) { }
123 10 0 if ($conn) { }
142 10 5 unless $self->_conn_idle_get($ip, $port)
153 0 0 if ($conn) { }
158 0 0 unless (ref $conn)
164 0 0 unless MogileFS::Util::wait_for_writeability($conn->fd, $timeout)
177 15 0 if ($conn) { }
195 15 8 if $inflight_cb
220 0 0 if ($conn) { }
254 11 0 if ($peer_addr)
261 11 0 if ($self->_dest_total($conn) < $$self{'dest_capacity'})
303 0 0 if $$self{'inflight'}{$key}{$fd}
310 0 0 if ($old->sock) { }
311 0 0 if ($old->fd == $fd)
329 9 0 if ($conn->sock)
340 0 9 if ($inflight_cb and not $valid)
354 1 0 if (scalar @$on_next_tick == 1)
374 15 0 if (ref $conn) { }
407 0 0 unless my $conn = shift @$val
409 0 0 if $conn->sock
431 2 4 if ($conn->expired($now)) { }
436 4 0 if ($expiry) { }
437 4 0 if $expiry < $next_expiry
446 2 4 if ($next_expiry == 18446744073709551615) { }
450 0 4 if $timeout <= 0
464 42 0 if ($conn->sock) { }
0 0 elsif ($timeout) { }
466 31 11 if ($timeout) { }
472 3 28 if (not $old_timer or $expiry < $next_expiry)
477 0 3 if $old_timer