Branch Coverage

blib/lib/Plack/Middleware/ServerStatus/Lite.pm
Criterion Covered Total %
branch 63 82 76.8


line true false branch
23 83 0 if ($self->allow) { }
24 81 2 ref $self->allow ? :
29 81 83 if (/:/) { }
35 83 0 if (@ipv4)
40 81 2 if (@ipv6)
50 82 1 if ($self->scoreboard)
57 21 62 if ($self->counter_file and not -f $self->counter_file)
58 0 21 unless open my $fh, '>>:unix', $self->counter_file
72 9 61 if ($self->path and $$env{'PATH_INFO'} eq $self->path)
74 3 6 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 2 138 unless $$self{'__scoreboard'}
117 69 69 if ($env)
119 69 0 defined $$env{'HTTP_HOST'} ? :
140 0 9 unless ($self->allowed($$env{'REMOTE_ADDR'}))
149 0 27 if ($upsince > $seconds)
159 3 6 if ($self->counter_file)
168 8 1 if (my $scoreboard = $$self{'__scoreboard'}) { }
176 1 7 if ($self->skip_ps_command) { }
0 7 elsif ($^O eq 'cygwin') { }
7 0 elsif (not $^O =~ /mswin32/i) { }
184 0 0 if $line =~ /^\D/
186 0 0 if $proc[2] == $parent_pid
190 0 7 $^O =~ /bsd$/ ? :
194 7 110 if $line =~ /^\D/
196 31 79 if $ppid == $parent_pid
212 11 21 if ($$pstatus{'status'} and $$pstatus{'status'} eq 'A') { }
219 23 9 if (defined $$pstatus{'time'})
226 193 63 defined $$pstatus{$_} ? :
246 1 8 if (($$env{'QUERY_STRING'} || '') =~ /\bjson\b/i)
254 0 9 if ($address =~ /:/)
255 0 0 unless $$self{'__cidr6'}
258 0 9 unless $$self{'__cidr4'}
265 20 43 unless ($$self{'__counter'})
266 0 20 unless open my $fh, '+<:unix', $self->counter_file
270 4 16 if (not $len or $buf != $parent_pid)
276 60 3 if (@_) { }
289 0 60 if ($total_bytes + $bytes > 9007199254740992) { }