| File | /usr/local/lib/perl5/5.10.1/Test/Deep/ArrayElementsOnly.pm |
| Statements Executed | 19 |
| Statement Execution Time | 246µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 12 | 12 | 12 | 210µs | 255µs | Test::Deep::BEGIN@1 |
| 12 | 12 | 12 | 116µs | 264µs | Test::Deep::BEGIN@2 |
| 1 | 1 | 1 | 11µs | 20µs | Test::Deep::ArrayElementsOnly::descend |
| 1 | 1 | 1 | 7µs | 22µs | Test::Deep::ArrayElementsOnly::BEGIN@6 |
| 1 | 1 | 1 | 2µs | 2µs | Test::Deep::ArrayElementsOnly::init |
| 0 | 0 | 0 | 0s | 0s | Test::Deep::ArrayElementsOnly::render_stack |
| 0 | 0 | 0 | 0s | 0s | Test::Deep::ArrayElementsOnly::reset_arrow |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | 3 | 22µs | 2 | 23µs | # spent 255µs (210+45) within Test::Deep::BEGIN@1 which was called 12 times, avg 21µs/call:
# once (28µs+8µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 1 of Test/Deep/Ignore.pm
# once (22µs+4µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 1 of Test/Deep/Hash.pm
# once (21µs+4µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 1 of Test/Deep/ArrayLength.pm
# once (19µs+4µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 1 of Test/Deep/RefType.pm
# once (18µs+4µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 1 of Test/Deep/Shallow.pm
# once (18µs+4µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 1 of Test/Deep/Blessed.pm
# once (18µs+3µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 1 of Test/Deep/Array.pm
# once (16µs+4µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 1
# once (14µs+3µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 1 of Test/Deep/ArrayLengthOnly.pm
# once (13µs+3µs) by Test::Deep::BEGIN@8 at line 1 of Test/Deep/Stack.pm
# once (13µs+3µs) by Test::Deep::BEGIN@9 at line 1 of Test/Deep/RegexpVersion.pm
# once (12µs+3µs) by Test::Deep::BEGIN@7 at line 1 of Test/Deep/Cache.pm # spent 19µs making 1 call to Test::Deep::BEGIN@1
# spent 3µs making 1 call to strict::import |
| 2 | 3 | 29µs | 2 | 37µs | # spent 264µs (116+148) within Test::Deep::BEGIN@2 which was called 12 times, avg 22µs/call:
# once (14µs+24µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 2 of Test/Deep/Ignore.pm
# once (12µs+20µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 2 of Test/Deep/Hash.pm
# once (16µs+11µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 2
# once (10µs+13µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 2 of Test/Deep/ArrayLength.pm
# once (10µs+12µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 2 of Test/Deep/Shallow.pm
# once (9µs+12µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 2 of Test/Deep/RefType.pm
# once (10µs+9µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 2 of Test/Deep/ArrayLengthOnly.pm
# once (8µs+11µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 2 of Test/Deep/Blessed.pm
# once (7µs+9µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 2 of Test/Deep/Array.pm
# once (7µs+9µs) by Test::Deep::BEGIN@7 at line 2 of Test/Deep/Cache.pm
# once (7µs+9µs) by Test::Deep::BEGIN@9 at line 2 of Test/Deep/RegexpVersion.pm
# once (6µs+9µs) by Test::Deep::BEGIN@8 at line 2 of Test/Deep/Stack.pm # spent 27µs making 1 call to Test::Deep::BEGIN@2
# spent 11µs making 1 call to warnings::import |
| 3 | |||||
| 4 | package Test::Deep::ArrayElementsOnly; | ||||
| 5 | |||||
| 6 | 3 | 176µs | 2 | 37µs | # spent 22µs (7+15) within Test::Deep::ArrayElementsOnly::BEGIN@6 which was called
# once (7µs+15µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 6 # spent 22µs making 1 call to Test::Deep::ArrayElementsOnly::BEGIN@6
# spent 15µs making 1 call to Test::Deep::Cmp::import |
| 7 | |||||
| 8 | sub init | ||||
| 9 | # spent 2µs within Test::Deep::ArrayElementsOnly::init which was called
# once (2µs+0s) by Test::Deep::Cmp::new at line 32 of Test/Deep/Cmp.pm | ||||
| 10 | 3 | 6µs | my $self = shift; | ||
| 11 | |||||
| 12 | my $val = shift; | ||||
| 13 | |||||
| 14 | $self->{val} = $val; | ||||
| 15 | } | ||||
| 16 | |||||
| 17 | sub descend | ||||
| 18 | # spent 20µs (11+8) within Test::Deep::ArrayElementsOnly::descend which was called
# once (11µs+8µs) by Test::Deep::descend at line 312 of Test/Deep.pm | ||||
| 19 | 6 | 10µs | my $self = shift; | ||
| 20 | my $got = shift; | ||||
| 21 | |||||
| 22 | my $exp = $self->{val}; | ||||
| 23 | |||||
| 24 | my $data = $self->data; # spent 8µs making 1 call to Test::Deep::Cmp::data | ||||
| 25 | |||||
| 26 | for my $i (0..$#{$exp}) | ||||
| 27 | { | ||||
| 28 | $data->{index} = $i; | ||||
| 29 | |||||
| 30 | my $got_elem = $got->[$i]; | ||||
| 31 | my $exp_elem = $exp->[$i]; | ||||
| 32 | |||||
| 33 | return 0 unless Test::Deep::descend($got_elem, $exp_elem) | ||||
| 34 | } | ||||
| 35 | |||||
| 36 | return 1; | ||||
| 37 | } | ||||
| 38 | |||||
| 39 | sub render_stack | ||||
| 40 | { | ||||
| 41 | my $self = shift; | ||||
| 42 | my ($var, $data) = @_; | ||||
| 43 | $var .= "->" unless $Test::Deep::Stack->incArrow; | ||||
| 44 | $var .= "[$data->{index}]"; | ||||
| 45 | |||||
| 46 | return $var; | ||||
| 47 | } | ||||
| 48 | |||||
| 49 | sub reset_arrow | ||||
| 50 | { | ||||
| 51 | return 0; | ||||
| 52 | } | ||||
| 53 | |||||
| 54 | 1 | 2µs | 1; |