Branch Coverage

blib/lib/DBIx/BatchChunker.pm
Criterion Covered Total %
branch 156 192 81.2


line true false branch
271 682 172 unless ($self->_has_dbic_retry_opts)
272 78 604 if $method eq "txn"
284 48 124 $method eq 'txn' ? :
512 38 14 if not $id_name or $id_name =~ /\./ or not defined $self->rs
753 181 658 if $self->_use_bignums
760 167 454 unless defined $val
761 0 454 if builtin::blessed($val) or not &PerlSafeInt()->check($val)
767 130 1844 unless defined $val
768 2 1842 if builtin::blessed($val) or not &PerlSafeInt()->check($val)
772 563 95 if (my $ls = $self->loop_state)
775 620 3321 unless defined $val
776 6 3315 if builtin::blessed($val) or not &PerlSafeInt()->check($val)
780 5 653 if $set_bignums
786 0 5 unless $is_on
791 4 11 unless defined $val
792 2 9 if builtin::blessed($val)
798 2 3 unless $ls
801 6 15 unless defined $val
802 0 15 if builtin::blessed($val)
1035 17 14 if ($self->rsc) { }
5 9 elsif ($self->dbic_storage) { }
1077 0 31 unless defined $min_id and defined $max_id
1081 2 29 if ($self->_check_bignums($min_id, $max_id)) { }
1149 32 1 if (defined $self->min_id and defined $self->max_id)
1161 1 32 unless ($count)
1166 1 31 if ($self->verbose)
1189 0 0 defined $ls->min_id ? :
551 0 defined $ls->prev_end ? :
551 184 unless defined $ls->start
1204 1 734 if ($self->max_runtime and &DBIx::BatchChunker::time() - $ls->total_timer > $self->max_runtime)
1209 0 734 unless $self->_process_past_max_checker
1212 183 551 unless $self->_process_block
1218 551 0 if $self->sleep
1229 32 0 if defined $ls->prev_end
1233 0 32 unless ($progress->silent)
1261 97 637 if ($count_stmt and defined $self->dbic_storage) { }
110 527 elsif ($count_stmt) { }
360 167 elsif (defined $count_rs) { }
1263 29 68 @$count_stmt == 1 ? :
1272 72 38 @$count_stmt == 1 ? :
1289 178 556 if $self->_check_bignums($chunk_count)
1292 183 551 unless $self->_chunk_count_checker
1298 218 333 if (my $stmt = $self->stmt) { }
271 62 elsif (defined $rs and $coderef) { }
1300 62 156 @$stmt > 2 ? :
1301 62 156 @$stmt > 2 ? :
1306 69 149 if ($self->single_rows and $coderef) { }
1308 45 24 if ($self->dbic_storage) { }
1331 53 96 if ($self->dbic_storage) { }
1338 5 48 if $self->coderef
1348 10 86 if $self->coderef
1356 81 190 if ($self->single_rows) { }
1400 650 84 unless $self->process_past_max
1401 78 6 unless $ls->end >= $self->max_id
1404 0 6 unless (defined $self->rsc or $self->max_stmt)
1411 0 6 if $self->verbose
1413 6 0 if (defined(my $rsc = $self->rsc)) { }
0 0 elsif ($self->dbic_storage) { }
1431 2 4 if $self->_check_bignums($new_max_id)
1433 0 6 if (not $new_max_id or $new_max_id eq '0E0') { }
2 4 elsif ($new_max_id > $self->max_id) { }
4 0 elsif ($new_max_id == $self->max_id) { }
1435 0 0 if $self->verbose
1443 0 2 if $self->verbose
1450 0 4 if $self->verbose
1454 0 0 if $self->verbose
1482 450 284 if ($self->min_chunk_percent <= 0 or not defined $ls->chunk_count)
1491 31 253 if ($ls->chunk_count == 0 and $self->min_chunk_percent > 0) { }
27 226 elsif ($ls->end - $ls->start <= 0) { }
29 197 elsif ($chunk_percent > 1 + $self->min_chunk_percent) { }
57 140 elsif ($self->target_time and $count_check_time > $self->target_time * 1.05) { }
0 140 elsif ($ls->checked_count > 10) { }
11 129 elsif ($ls->end >= $self->max_id) { }
66 63 elsif ($chunk_percent < $self->min_chunk_percent) { }
1509 9 18 if ($ls->chunk_count > 1)
1585 407 144 unless $self->target_time
1586 0 144 unless $ls->chunk_size and $ls->prev_runtime
1601 80 64 if @$timings > 5
1610 54 90 if ($adjust_factor > 1.05) { }
90 0 elsif ($adjust_factor < 0.95) { }
1613 45 9 unless $ttl >= 5
1614 0 9 if &any(sub { $_->{'runtime'} >= $self->target_time; } , @$timings)
1622 21 69 unless $ls->prev_runtime > $self->target_time
1624 0 69 $ls->prev_runtime < $self->target_time * 3 ? :
1629 69 0 if $new_target_chunk_size < 1
1634 68 10 if $new_target_chunk_size == $ls->chunk_size
1635 0 10 if $new_target_chunk_size < 1
1638 0 10 if ($self->verbose)
1654 9 1 if $adjective eq "fast"
1670 0 582 if $ls->end > $self->max_id
1684 720 14 unless $self->verbose
1698 14 0 if ($ls->start < 1000000000 and $ls->end < 1000000000) { }
1713 12 2 if $ls->chunk_count
1718 5 9 if ($action eq "processed")
1719 5 0 $sleep ? :
1733 0 14 if ($ls->start > 1000000000 or $ls->end > 1000000000)