Branch Coverage

blib/lib/MogileFS/ProcManager.pm
Criterion Covered Total %
branch 1 170 0.5


line true false branch
74 0 0 unless my $pidfile = 'MogileFS'->config('pidfile')
77 0 0 unless (open $fh, ">$pidfile")
81 0 0 unless (print $fh "$$\n" and close $fh)
91 0 0 unless my $pidfile = 'MogileFS'->config('pidfile')
120 0 0 unless my $suffix = $class->job_to_class_suffix($job)
132 0 0 if $healthy
136 0 0 if $todie{$pid} and $todie{$pid} == 2
152 0 0 unless $nowish > $lastspawntime
159 0 0 unless $pid > 0
165 0 0 if ($jobconn = delete $child{$pid})
167 0 0 $todie{$pid} ? :
172 0 0 if (my $jobstat = $jobs{$job})
176 0 0 unless (my $true = delete $todie{$pid})
184 0 0 if $allkidsup
190 0 0 if not $want_job_master and $needs_job_master{$job}
193 0 0 if ($need > 0)
196 0 0 unless my $jobconn = make_new_child($job)
227 0 0 unless sigprocmask(0, $sigset)
230 0 0 unless socketpair my $parents_ipc, my $childs_ipc, 1, 1, 0
233 0 0 unless defined($pid = fork)
241 0 0 if ($pid)
242 0 0 unless sigprocmask(1, $sigset)
268 0 0 unless sigprocmask(1, $sigset)
272 0 0 unless my $class = 'MogileFS::ProcManager'->job_to_class($job)
335 0 0 unless $class->is_valid_job($job)
336 0 0 if $job =~ /^(?:job_master|monitor)$/i and $n > 1
338 0 0 if $job eq 'job_master'
344 0 0 if $job eq 'queryworker'
383 0 0 if delete $ChildrenByJob{$job}{$pid}
399 4 0 unless %ErrorsTo
425 0 0 if ($worker->job eq 'queryworker')
441 0 0 if (@PendingQueries)
455 0 0 if (job_needs_reduction('queryworker'))
493 0 0 if $IsChild
494 0 0 unless $worker and $Mappings{$$worker{'fd'}}
501 0 0 unless $client
505 0 0 if $$client{'closed'}
509 0 0 if ($line =~ /^(\d+-\d+)\s+(\-?\d+\.\d+)\s+(.+)$/)
518 0 0 unless ($id and $id eq "$$worker{'pid'}-$$worker{'reqid'}")
519 0 0 unless defined $id
520 0 0 unless defined $line
531 0 0 if scalar @RecentQueries > 50
545 0 0 if $IsChild
548 0 0 unless @$queue
549 0 0 unless $idle_workers{$job} and keys %{$idle_workers{$job};}
553 0 0 if (not defined $worker or $$worker{'closed'})
563 0 0 unless @$queue
570 0 0 if $IsChild
577 0 0 unless $clref = shift @PendingQueries
579 0 0 if ($$clref[0]{'closed'})
584 0 0 unless $clref
588 0 0 if (not defined $worker or $$worker{'closed'})
637 0 0 if ($IsChild)
647 0 0 unless $child->job
650 0 0 if ($cmd =~ /^error (.+)$/i) { }
0 0 elsif ($cmd =~ /^debug (.+)$/i) { }
0 0 elsif ($cmd =~ /^queue_depth (\w+)/) { }
0 0 elsif ($cmd =~ /^queue_todo (\w+) (.+)/) { }
0 0 elsif ($cmd =~ /^worker_bored (\d+) (.+)/) { }
0 0 elsif ($cmd eq ':ping') { }
0 0 elsif ($cmd eq ':still_alive') { }
0 0 elsif ($cmd =~ /^:monitor_events/) { }
0 0 elsif ($cmd eq ':monitor_just_ran') { }
0 0 elsif ($cmd =~ /^:wake_a (\w+)$/) { }
0 0 elsif ($cmd =~ /^:set_config_from_child (\S+) (.+)/) { }
0 0 elsif ($cmd =~ /^:refresh_monitor$/) { }
660 0 0 if ($job eq 'all') { }
667 0 0 if ($pending_work{$job})
681 0 0 if (job_needs_reduction($child->job)) { }
684 0 0 unless (exists $idle_workers{$child->job})
701 0 0 if (job_needs_reduction($child->job)) { }
734 0 0 if length $cmd > 80
755 0 0 unless defined $childref and %$childref
759 0 0 if $exclude_child and $exclude_child == $child
763 0 0 if $just_one
771 0 0 if $IsChild
775 0 0 unless $worker
778 0 0 unless defined $fd
781 0 0 if ($Mappings{$fd})
796 0 0 unless defined $jobs{$job}
801 0 0 unless $todie{$pid}
812 0 0 if (not $want_job_master and $needs_job_master{$job} and $jobs{'job_master'}[1] == 0 and ($q = $pending_work{$job}) && !@$q || !$q)
828 0 0 if ($child) { }
838 0 0 if $exclude and $child == $exclude
846 0 0 unless ($monitor_good)