Branch Coverage

blib/lib/MogileFS/Worker/Monitor.pm
Criterion Covered Total %
branch 0 118 0.0


line true false branch
59 0 0 if ($$self{'refresh_state'})
68 0 0 if ($have_dbh and not $$self{'have_masterdb'}) { }
0 0 elsif (not $have_dbh) { }
77 0 0 if ($have_dbh)
94 0 0 if $$self{'refresh_state'}
104 0 0 if ($have_dbh and Mgd::get_store()->get_lock('mgfs:device_update', 0)) { }
121 0 0 if (my $state = $self->is_iow_diff($dev))
126 0 0 unless $dev->can_read_from
130 0 0 unless keys %{$$self{'refresh_state'};}
136 0 0 if ($$self{'updateable_devices'})
162 0 0 if ($pending_since and $pending_since > $start)
174 0 0 if (not $pending_since or $pending_since <= $start)
178 0 0 if (delete $$self{'db_monitor_ran'} or $pending_since)
199 0 0 unless $dev
210 0 0 unless ($self->cache_refresh)
237 0 0 if ($$lineref =~ /^:refresh_monitor$/)
238 0 0 if ($self->cache_refresh) { }
268 0 0 unless @flat
301 0 0 if (not defined $p or $p ne $c)
318 0 0 $type eq 'srvset' ? :
0 0 $type eq 'device' ? :
0 0 $type eq 'host' ? :
0 0 $type eq 'class' ? :
0 0 $type eq 'domain' ? :
327 0 0 if $type eq 'device'
328 0 0 if (not $old or $self->diff_hash($old, $item))
349 0 0 if exists $$old{$k} and not exists $$new{$k}
350 0 0 if exists $$new{$k} and not exists $$old{$k}
351 0 0 if defined $$old{$k} and not defined $$new{$k}
352 0 0 if defined $$new{$k} and not defined $$old{$k}
353 0 0 unless defined $$new{$k} or defined $$old{$k}
354 0 0 if $$old{$k} ne $$new{$k}
393 0 0 unless /^(\w+)\s*:\s*(.+)$/
398 0 0 unless ($used and $total)
399 0 0 unless defined $used
400 0 0 unless defined $total
410 0 0 if ($$self{'updateable_devices'})
412 0 0 $devrow && $$devrow{'mb_asof'} ? :
413 0 0 if ($last + 15 < time)
424 0 0 unless $Mgd::DEBUG >= 1
437 0 0 if (not $test_write or $$test_write{'tries'} > 0)
466 0 0 if $$self{'skip_host'}{$dev->hostid}
478 0 0 unless ($self->on_usage_response($dev, $response, $start_time))
483 0 0 if (($$self{'last_test_write'}{$devid} || 0) + 15 > $now)
488 0 0 unless ($dev->can_delete_from)
521 0 0 if ($response->is_success)
522 0 0 if ($response->content eq $$test_write{'content'})
523 0 0 unless ($dev->observed_writeable)
533 0 0 if $$test_write{'tries'} > 0
541 0 0 if $response->is_success
551 0 0 if ($response->is_success)
553 0 0 unless ($host->observed_reachable)
564 0 0 if ($failed_after < 0.5) { }
565 0 0 unless ($dev->observed_unreachable)
573 0 0 unless ($host->observed_unreachable)
601 0 0 $response->is_success ? :
604 0 0 if (not defined $prev or $prev != $rej)
617 0 0 unless ($dev->observed_readable)
634 0 0 if (scalar keys %{$$self{'refresh_state'};} == 0)