| 1 | package Dumbbench::Result; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use Carp (); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use Number::WithError; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use parent 'Number::WithError'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | 3 | ▶ | use Class::XSAccessor { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 3 | getters => { | |||||||||||||||||||||||||||||||||||||||||
| 11 | nsamples => '_dbr_nsamples', | ||||||||||||||||||||||||||||||||||||||||||
| 12 | }, | ||||||||||||||||||||||||||||||||||||||||||
| 13 | 3 | }; | |||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||
| 16 | 22 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=7 SCAR=20.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | 22 | my $proto = shift; | |||||||||||||||||||||||||||||||||||||||||
| 18 | 22 | ▶ | my $class = ref($proto)||$proto; | ||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table66%2/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | 22 | my $self; | |||||||||||||||||||||||||||||||||||||||||
| 21 | 22 | ▶ | if (not grep {$_ eq 'timing'} @_) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 22 | 12 | ▶ | push @_, 0 if @_ == 1; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 23 | 12 | $self = $proto->SUPER::new(@_); | |||||||||||||||||||||||||||||||||||||||||
| 24 | 12 | $self->{_dbr_nsamples} = $proto->nsamples; | |||||||||||||||||||||||||||||||||||||||||
| 25 | 12 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | 10 | my %opt = @_; | |||||||||||||||||||||||||||||||||||||||||
| 29 | 10 | ▶ | if (not defined $opt{timing} or not defined $opt{uncertainty} | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
defined $opt{"timing"} and defined $opt{"uncertainty"} and defined $opt{"nsamples"}
defined $opt{"timing"} and defined $opt{"uncertainty"}
MC/DC0%0/3
defined $opt{"timing"} and defined $opt{"uncertainty"} and defined $opt{"nsamples"}
defined $opt{"timing"}
defined $opt{"uncertainty"}
defined $opt{"nsamples"}
Truth table25%1/4
A and B and C
A= defined $opt{"timing"}B= defined $opt{"uncertainty"}C= defined $opt{"nsamples"}
| |||||||||||||||||||||||||||||||||||||||||||
| 30 | or not defined $opt{nsamples}) { | ||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | Carp::croak("Need 'timing', 'uncertainty', and 'nsamples' parameters"); | |||||||||||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||||||||||
| 33 | 10 | $self = $class->SUPER::new($opt{timing}, $opt{uncertainty}); | |||||||||||||||||||||||||||||||||||||||||
| 34 | 10 | $self->{_dbr_nsamples} = $opt{nsamples}; | |||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||
| 36 | 10 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||