Branch Coverage

blib/lib/MCE/Util.pm
Criterion Covered Total %
branch 38 166 22.8


line true false branch
27 0 107 $^O =~ /mswin|mingw|msys|cygwin/i ? :
54 5 61 if defined $g_ncpu
64 61 0 if (/linux|android/)
66 61 0 if (open $fh, '<', '/proc/stat') { }
0 0 elsif (open $fh, '<', '/proc/cpuinfo') { }
74 61 0 if $count
78 0 0 if (/bsd|darwin|dragonfly/)
80 0 0 if @output
84 0 0 if (/aix/)
86 0 0 if (@output)
88 0 0 if $1
90 0 0 unless ($ncpu)
92 0 0 if (@output) { }
96 0 0 if @output
102 0 0 if (/gnu/)
104 0 0 if @output
108 0 0 if (/haiku/)
110 0 0 if @output
114 0 0 if (/hp-?ux/)
116 0 0 if $count
120 0 0 if (/irix/)
122 0 0 if @out
126 0 0 if (/osf|solaris|sunos|svr5|sco/)
127 0 0 if (-x '/usr/sbin/psrinfo') { }
129 0 0 if $count
133 0 0 if @output
138 0 0 if (/mswin|mingw|msys|cygwin/)
139 0 0 if (exists $ENV{'NUMBER_OF_PROCESSORS'})
148 0 61 if not $ncpu or $ncpu < 1
164 0 386 unless defined $_obj->{$_p}
166 0 386 if (ref $_obj->{$_p} eq 'ARRAY') { }
168 0 0 unless defined $_obj->{$_p}[$_i]
169 0 0 if fileno $_obj->{$_p}[$_i]
174 386 0 if fileno $_obj->{$_p}
187 166 606 unless defined $_obj->{$_p}
189 154 452 if (ref $_obj->{$_p} eq 'ARRAY') { }
191 0 478 unless defined $_obj->{$_p}[$_i]
192 478 0 if (fileno $_obj->{$_p}[$_i])
193 0 478 if $_is_winenv
201 452 0 if (fileno $_obj->{$_p})
202 0 452 if $_is_winenv
217 0 431 if (defined $_i) { }
220 0 0 unless pipe $_obj->{$_r_sock}[$_i], $_obj->{$_w_sock}[$_i]
224 0 431 unless pipe $_obj->{$_r_sock}, $_obj->{$_w_sock}
235 517 494 if (defined $_i) { }
239 391 126 if ($_seq and $^O eq 'linux' and eval ' Socket::SOCK_SEQPACKET() ') { }
241 0 391 unless (socketpair $_obj->{$_r_sock}[$_i], $_obj->{$_w_sock}[$_i], 1, 5, 0)
242 0 0 unless socketpair $_obj->{$_r_sock}[$_i], $_obj->{$_w_sock}[$_i], 1, 1, 0
247 0 126 unless socketpair $_obj->{$_r_sock}[$_i], $_obj->{$_w_sock}[$_i], 1, 1, 0
251 0 517 unless ($^O =~ /aix|linux|android/)
262 465 29 if ($_seq and $^O eq 'linux' and eval ' Socket::SOCK_SEQPACKET() ') { }
264 0 465 unless (socketpair $_obj->{$_r_sock}, $_obj->{$_w_sock}, 1, 5, 0)
265 0 0 unless socketpair $_obj->{$_r_sock}, $_obj->{$_w_sock}, 1, 1, 0
270 0 29 unless socketpair $_obj->{$_r_sock}, $_obj->{$_w_sock}, 1, 1, 0
274 0 494 unless ($^O =~ /aix|linux|android/)
290 0 0 if not defined $_timeout and $_sock_ready{"$_socket"} > 1
294 0 0 if (not defined $_timeout) { }
298 0 0 if $_timeout < 0
299 0 0 if $_timeout
306 0 0 if $_val_bytes ne $_zero_bytes
307 0 0 if $_timeout and &MCE::Util::time() > $_timeout
310 0 0 if $_delay
311 0 0 if &MCE::Util::time() - $_start > "0.03"
317 0 0 if $_sock_ready{"${_socket}_w"} > 1
324 0 0 if select(undef, $_vec, undef, 0) > 0
336 1283 0 @_ == 3 ? :
0 1283 unless (@_ == 3 ? sysread($_[0], $_[1], $_[2]) : sysread($_[0], $_[1], $_[2], $_[3]))
337 0 0 if $! == 4
349 0 0 @_ == 3 ? :
0 0 unless ($_bytes = @_ == 3 ? sysread($_[0], $_[1], $_[2]) : sysread($_[0], $_[1], $_[2], $_[3]))
350 0 0 unless (defined $_bytes)
351 0 0 if $! == 4
354 0 0 if ($! == 11 or $! == 11)
355 0 0 if $_delay
358 0 0 unless $_start
359 0 0 if &MCE::Util::time() - $_start > "0.03"
370 0 1208 if ($^O eq 'MSWin32') { }
372 0 0 $_[1] ? :
376 604 604 $_[1] ? :
398 0 0 if $seconds < 0
400 0 0 if ($INC{'Coro/AnyEvent.pm'}) { }
0 0 elsif (&Time::HiRes::d_nanosleep) { }
0 0 elsif (&Time::HiRes::d_usleep) { }