Condition Coverage

blib/lib/Monoceros/Server.pm
Criterion Covered Total %
condition 13 169 7.6


and 3 conditions

line !l l&&!r l&&r condition
200 9 0 0 $stats eq $prev_stats and @_
269 0 0 0 $self->{'sockets'}{$key}[4] == 0 and $self->{'sockets'}{$key}[3] == 0
0 0 0 $self->{'sockets'}{$key}[4] == 0 and $self->{'sockets'}{$key}[3] == 0 and $time - $self->{'sockets'}{$key}[2] > $self->{'timeout'}
0 0 0 $self->{'sockets'}{$key}[4] == 0 and $self->{'sockets'}{$key}[3] > 0
0 0 0 $self->{'sockets'}{$key}[4] == 0 and $self->{'sockets'}{$key}[3] > 0 and $time - $self->{'sockets'}{$key}[2] > $self->{'keepalive_timeout'}
302 0 0 0 not defined $ret and $! == 4 || $! == 11 || $! == 11
309 0 0 0 defined $buf and length $buf == 0
343 0 0 0 $fd < 0 and $! == 4 || $! == 11 || $! == 11
398 0 0 0 $self->{'workers'}{$wid}{'running'} and $self->{'workers'}{$wid}{'running'} == $exit_pid
476 0 0 0 $self->{'term_received'} and not $next_conn
479 0 0 0 $next_conn and $next_conn->{'buf'}
495 0 0 0 $next_conn and fileno $next_conn->{'fh'} == $try_read_fd
508 0 0 0 $conn and $next_conn
0 0 0 $conn and $next_conn and $conn != $next_conn
512 0 0 0 not $conn and $next_conn
548 0 0 0 not defined $ret and $! == 11 || $! == 11 || $! == 4
0 0 0 defined $ret and $ret == 0
576 0 0 0 defined $pipelined_buf and length $pipelined_buf
583 0 0 0 $conn->{'reqs'} < $max_readahead_reqs and $proc_req_count < $max_reqs_per_child
614 0 0 0 not defined $ret and $! != 11
0 0 0 not defined $ret and $! != 11 and $! != 11
0 0 0 not defined $ret and $! != 11 and $! != 11 and $! != 4
630 0 0 0 $! != 4 and $! != 11
0 0 0 $! != 4 and $! != 11 and $! != 11
0 0 0 $! != 4 and $! != 11 and $! != 11 and $! != 29
0 0 0 not $peer and ($! != 4 and $! != 11 and $! != 11 and $! != 29)
652 0 0 0 $! != 4 and $! != 11
0 0 0 $! != 4 and $! != 11 and $! != 11
0 0 0 $! != 4 and $! != 11 and $! != 11 and $! != 29
0 0 0 $fd < 0 and ($! != 4 and $! != 11 and $! != 11 and $! != 29)
720 0 0 0 $use_keepalive and $reqs <= 1
832 0 0 0 $$use_keepalive_r and lc $v ne 'keep-alive'
850 0 0 0 not Plack::Util::status_with_no_entity_body($status_code) and defined(my $cl = Plack::Util::content_length($body))
880 0 0 0 defined $body and ref $body eq 'ARRAY'
0 0 0 defined $body and ref $body eq 'ARRAY' and @$body == 1
0 0 0 defined $body and ref $body eq 'ARRAY' and @$body == 1 and length $body->[0] < 8192
921 0 0 0 $use_chunked and not $completed

or 2 conditions

line l !l condition
33 0 14 $ENV{'MONOCEROS_DEBUG'} || 0
63 9 0 eval { do { POSIX::sysconf(4) - 1 } } || 1023
92 5 4 $args{'host'} || 0
9 0 $args{'port'} || 8080
0 9 $args{'timeout'} || 300
0 9 $args{'keepalive_timeout'} || 10
2 7 $args{'server_ready'} || sub { }
0 9 $args{'max_reqs_per_child'} || $args{'max_requests'} || 100

or 3 conditions

line l !l&&r !l&&!r condition
92 0 9 0 $args{'max_keepalive_connection'} || int $open_max / 2
0 9 0 $args{'server_software'} || $class
176 0 0 0 $! == 11 or $! == 11
0 0 0 $! == 11 or $! == 11 or $! == 4
185 0 0 0 $self->{'fdsend_worker'} ||= &AE::io($self->{'fdpass_sock'}[0], 1, sub { while (my $sockid = shift @{$$self{'fdsend_queue'};}) { do { unless (exists $self->{'sockets'}{$sockid}) { next; } ; if (_getpeername($self->{'sockets'}{$sockid}[1], my $addr) < 0) { delete $self->{'sockets'}{$sockid}; next; } ; my $ret = IO::FDPass::send(fileno $self->{'fdpass_sock'}[0], $self->{'sockets'}{$sockid}[1]); unless ($ret) { if ($! == 11 or $! == 11 or $! == 4) { unshift @{$$self{'fdsend_queue'};}, $sockid; return; } ; die "unable to pass queue: $!"; undef $self->{'fdsend_worker'}; } }; } ; undef $self->{'fdsend_worker'}; } )
302 0 0 0 $! == 4 || $! == 11 || $! == 11
343 0 0 0 $! == 4 || $! == 11 || $! == 11
474 0 0 0 $next_conn or $self->{'stop_accept'}
0 0 0 $next_conn or $self->{'stop_accept'} or $proc_req_count < $max_reqs_per_child
494 0 0 0 not defined $rfd or vec $rfd, $try_read_fd, 1
548 0 0 0 $! == 11 || $! == 11 || $! == 4
561 0 0 0 $self->{'term_received'} or $self->{'stop_accept'}
850 0 0 0 defined $send_headers{'content-length'} or defined $send_headers{'transfer-encoding'}
866 0 0 0 defined $send_headers{'content-length'} or defined $send_headers{'transfer-encoding'}