Branch Coverage

blib/lib/KiokuDB/Test/Fixture/Concurrency.pm
Criterion Covered Total %
branch 1 24 4.1


line true false branch
57 33 0 unless $ENV{'KIOKUDB_STRESS_TEST'}
89 0 0 unless defined(my $pid = fork)
90 0 0 if $pid
108 0 0 if $?
135 0 0 if &try(sub { $self->txn_do(sub { my $s = $self->new_scope; $counter = $self->lookup('counter')->{'value'}; @accounts = map({$$_{'value'};} $self->lookup(map({"${_}_account";} 1..250))); } ); ++$ok; } )
140 0 0 unless $ok
174 0 0 if (my $foo = $self->lookup($id)) { }
175 0 0 if (rand > 0.5) { }
191 0 0 if rand > 0.5
211 0 0 if rand > 0.5
221 0 0 if &try(sub { $self->txn_do(sub { my $s = $self->new_scope; my $counter = $self->lookup('counter'); my $counter_two = $self->lookup('counter_' . int(rand 250)); select undef, undef, undef, 0.02 * (rand) if rand > 0.5; ++$$counter_two{'value'}; $self->update($counter_two); ++$$counter{'value'}; $self->update($counter); } ); ++$ok; } )
226 0 0 unless $ok