Branch Coverage

blib/lib/Plack/Middleware/ServerStatus/Lite.pm
Criterion Covered Total %
branch 58 82 70.7


line true false branch
23 81 0 if ($self->allow) { }
24 81 0 ref $self->allow ? :
29 81 81 if (/:/) { }
35 81 0 if (@ipv4)
40 81 0 if (@ipv6)
50 81 0 if ($self->scoreboard)
57 21 60 if ($self->counter_file and not -f $self->counter_file)
58 0 21 unless open my $fh, '>>:unix', $self->counter_file
72 8 61 if ($self->path and $env->{'PATH_INFO'} eq $self->path)
74 3 5 if ($self->counter_file)
85 46 15 if (defined $res->[2])
86 43 3 if ($self->counter_file)
97 15 15 unless (defined $chunk)
98 14 1 if ($self->counter_file)
113 0 138 unless $self->{'__scoreboard'}
117 69 69 if ($env)
125 69 0 defined $env->{'HTTP_HOST'} ? :
140 0 8 unless ($self->allowed($env->{'REMOTE_ADDR'}))
151 0 24 if ($upsince > $seconds)
161 3 5 if ($self->counter_file)
170 8 0 if (my $scoreboard = $self->{'__scoreboard'}) { }
178 1 7 if ($self->skip_ps_command) { }
0 7 elsif ($^O eq 'cygwin') { }
7 0 elsif (not $^O =~ /mswin32/i) { }
186 0 0 if $line =~ /^\D/
188 0 0 if $proc[2] == $parent_pid
192 0 7 $^O =~ /bsd$/ ? :
196 7 116 if $line =~ /^\D/
198 35 81 if $ppid == $parent_pid
214 12 24 if ($pstatus->{'status'} and $pstatus->{'status'} eq 'A') { }
221 24 12 if (defined $pstatus->{'time'})
229 204 84 defined $pstatus->{$_} ? :
248 1 7 if (($env->{'QUERY_STRING'} || '') =~ /\bjson\b/i)
256 0 8 if ($address =~ /:/)
257 0 0 unless $self->{'__cidr6'}
260 0 8 unless $self->{'__cidr4'}
267 20 43 unless ($self->{'__counter'})
268 0 20 unless open my $fh, '+<:unix', $self->counter_file
272 4 16 if (not $len or $buf != $parent_pid)
278 60 3 if (@_) { }
291 0 60 if ($total_bytes + $bytes > 9007199254740992) { }