Branch Coverage

blib/lib/MogileFS/ProcManager.pm
Criterion Covered Total %
branch 0 142 0.0


line true false branch
59 0 0 unless my $pidfile = 'MogileFS'->config('pidfile')
62 0 0 unless (open $fh, ">$pidfile")
66 0 0 unless (print $fh "$$\n" and close $fh)
76 0 0 unless my $pidfile = 'MogileFS'->config('pidfile')
104 0 0 unless my $suffix = $class->job_to_class_suffix($job)
116 0 0 if $healthy
131 0 0 unless $nowish > $lastspawntime
138 0 0 if $pid <= 0 and $allkidsup
144 0 0 if ($pid > -1 and $jobconn = delete $child{$pid})
146 0 0 $todie{$pid} ? :
151 0 0 if (my $jobstat = $jobs{$job})
155 0 0 unless (my $true = delete $todie{$pid})
165 0 0 if ($need > 0)
168 0 0 unless my $jobconn = make_new_child($job)
195 0 0 unless sigprocmask(0, $sigset)
198 0 0 unless socketpair my $parents_ipc, my $childs_ipc, 1, 1, 0
201 0 0 unless defined($pid = fork)
209 0 0 if ($pid)
210 0 0 unless sigprocmask(1, $sigset)
233 0 0 unless sigprocmask(1, $sigset)
237 0 0 unless my $class = 'MogileFS::ProcManager'->job_to_class($job)
292 0 0 unless $class->is_valid_job($job)
298 0 0 if $job eq 'queryworker'
327 0 0 if delete $ChildrenByJob{$job}{$pid}
343 0 0 unless %ErrorsTo
369 0 0 if ($worker->job eq 'queryworker')
395 0 0 if (job_needs_reduction('queryworker'))
433 0 0 if $IsChild
434 0 0 unless $worker and $Mappings{$$worker{'fd'}}
441 0 0 unless $client
445 0 0 if $$client{'closed'}
449 0 0 if ($line =~ /^(\d+-\d+)\s+(\-?\d+\.\d+)\s+(.+)$/)
458 0 0 unless ($id and $id eq "$$worker{'pid'}-$$worker{'reqid'}")
459 0 0 unless defined $id
460 0 0 unless defined $line
471 0 0 if scalar @RecentQueries > 50
480 0 0 if $IsChild
487 0 0 unless $clref = shift @PendingQueries
489 0 0 if ($$clref[0]{'closed'})
494 0 0 unless $clref
498 0 0 if (not defined $worker or $$worker{'closed'})
553 0 0 if ($IsChild)
563 0 0 unless $child->job
566 0 0 if ($cmd =~ /^error (.+)$/i) { }
0 0 elsif ($cmd =~ /^debug (.+)$/i) { }
0 0 elsif ($cmd =~ /^:state_change (\w+) (\d+) (\w+)/) { }
0 0 elsif ($cmd =~ /^:repl_unreachable (\d+)/) { }
0 0 elsif ($cmd =~ /^repl_i_did (\d+)/) { }
0 0 elsif ($cmd =~ /^repl_starting (\d+)/) { }
0 0 elsif ($cmd eq ':ping') { }
0 0 elsif ($cmd eq ':still_alive') { }
0 0 elsif ($cmd eq ':monitor_just_ran') { }
0 0 elsif ($cmd =~ /^:wake_a (\w+)$/) { }
0 0 elsif ($cmd =~ /^:invalidate_meta (\w+)/) { }
0 0 elsif ($cmd =~ /^:set_config_from_child (\S+) (.+)/) { }
0 0 elsif (my($devid, $util) = $cmd =~ /^:set_dev_utilization (\d+) (.+)/) { }
602 0 0 if (job_needs_reduction($child->job)) { }
631 0 0 if ($nowish > $last_util_spray + 3)
638 0 0 if length $cmd > 80
659 0 0 unless defined $childref and %$childref
663 0 0 if $exclude_child and $exclude_child == $child
667 0 0 if $just_one
675 0 0 if $IsChild
679 0 0 unless $worker
682 0 0 unless defined $fd
685 0 0 if ($Mappings{$fd})
699 0 0 unless defined $jobs{$job}
720 0 0 if $exclude and $child == $exclude
722 0 0 if ($old ne $state)
732 0 0 if ($child) { }
742 0 0 if $exclude and $child == $exclude