Branch Coverage

blib/lib/Linux/Info/PgSwStats.pm
Criterion Covered Total %
branch 19 34 55.8


line true false branch
134 0 1 ref $_[0] ? :
144 0 1 if (defined $opts->{'initfile'})
158 0 1 if ($self->{'initfile'} and -r $self->{'initfile'}) { }
172 0 1 unless (exists $self->{'init'})
179 0 1 if ($self->{'initfile'})
205 2 0 $file->{'path'} ? :
206 0 2 unless open my $fh, '<', $filename
210 0 48 if ($line =~ /^page\s+(\d+)\s+(\d+)$/) { }
0 48 elsif ($line =~ /^swap\s+(\d+)\s+(\d+)$/) { }
223 2 0 unless (defined $stats{'pswpout'})
225 2 0 $file->{'path'} ? :
226 0 2 unless open my $fh, '<', $filename
230 214 12 unless $line =~ /^(pgpgin|pgpgout|pswpin|pswpout|pgfault|pgmajfault)\s+(\d+)/
250 0 6 unless (defined $istat->{$k} and defined $lstat->{$k})
254 0 6 unless ($v =~ /^\d+\z/ and $istat->{$k} =~ /^\d+\z/)
258 5 1 if ($lstat->{$k} == $istat->{$k} or $istat->{$k} > $lstat->{$k}) { }
1 0 elsif ($delta > 0) { }