Branch Coverage

blib/lib/Algorithm/Bucketizer.pm
Criterion Covered Total %
branch 25 38 65.7


line true false branch
47 43106 23 if $$self{'algorithm'} eq 'retry'
54 17036 26102 if ($bucket->probe_item($item, $size))
62 0 26093 unless $$self{'add_buckets'}
65 26093 0 if ($bucket->probe_item($item, $size))
80 0 0 if (defined $idx)
121 2 0 unless (exists $$self{'buckets'}[$bucket_idx])
139 0 2 unless defined $options{'algorithm'}
140 1 1 if exists $options{'maxtime'} and $options{'maxtime'} < 3
147 0 2 if ($options{'algorithm'} eq 'brute_force') { }
2 0 elsif ($options{'algorithm'} eq 'random') { }
154 0 1 unless exists $options{'maxrounds'} or exists $options{'maxtime'}
177 3 10768 if (not defined $minbuckets or $nof_buckets < $minbuckets)
183 1 10770 if exists $options{'maxrounds'} and $round >= $options{'maxrounds'}
184 1 10769 if exists $options{'maxtime'} and time > $start_time + $options{'maxtime'}
222 11643 20670 if $i == $j
280 43131 0 if ($self->probe_item($item, $size))
297 0 112362 if ($$self{'maxitems'})
298 0 0 if (scalar $$self{'items'} >= $$self{'maxitems'})
303 86260 26102 if ($$self{'size'} + $size <= $$self{'maxsize'}) { }