Branch Coverage

blib/lib/Timer/Milestones.pm
Criterion Covered Total %
branch 85 88 96.5


line true false branch
159 8 16 if (my(%params) = @_)
161 8 8 if (ref $params{$coderef_param} eq 'CODE')
183 14 146 unless (&blessed($arguments[0]) and $arguments[0]->isa('Timer::Milestones'))
204 24 3 unless (exists $self->{'milestones'})
226 2 38 if ($self->{'timing_stopped'})
236 14 24 if (my $previous_milestone = $self->_end_previous_milestone) { }
256 1 0 if (my $calling_subroutine = (caller 2)[3]) { }
284 14 27 if $self->{'generated_report'}
287 0 27 unless $self->{'milestones'}
294 26 18 unless ($previous_milestone)
305 18 26 if ($previous_milestone)
310 5 13 if @function_calls
320 12 32 if ($milestone->{'function_calls'})
329 22 5 if ($self->{'timing_stopped'})
336 7 15 if @function_calls
367 25 32 unless ($function_call->{'summarise_calls'})
373 8 17 if (exists $function_call->{'argument_summary'})
388 5 27 unless ($element)
401 13 19 if (exists $function_call->{'argument_summary'})
405 4 9 unless ($matching_arguments)
436 48 88 if ($element->{'type'} eq 'time') { }
18 70 elsif ($element->{'type'} eq 'milestone') { }
40 30 elsif ($element->{'type'} eq 'interval') { }
30 0 elsif ($element->{'type'} eq 'function_call') { }
451 5 25 if ($element->{'call_count'})
458 10 20 if ($element->{'arguments_seen'})
461 3 9 if ($arguments->{'call_count'} > 1)
482 56 87 if $unit_spec->{'max'} and $elapsed_time >= $unit_spec->{'max'}
486 79 8 $unit_spec->{'transform'} ? :
533 22 13 unless ($self->{'timing_stopped'})
555 5 23 if ($self->{'wrapped_functions'})
564 15 13 if ($report)
580 35 25 if (my $previous_milestone = $self->{'milestones'}[-1])
602 19 1 eval { do { require Time::HiRes; &Time::HiRes::time() } } ? :
699 2 16 if (ref $function_name_or_coderef eq 'CODE') { }
708 4 12 unless ($function_name =~ /::/)
718 2 14 unless (defined &$orig_code)
738 29 27 if ($args{'summarise_calls'})
743 21 35 if ($args{'summarise_arguments'})
750 1 55 if ($wantarray) { }
8 47 elsif (defined $wantarray) { }
762 1 55 if ($wantarray) { }
8 47 elsif (defined $wantarray) { }
772 14 2 if ($modify_symbol_table)