Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/ArrayElementsOnly.pm |
Statements | Executed 202 statements in 2.52ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
15 | 1 | 1 | 956µs | 2.09ms | descend | Test::Deep::ArrayElementsOnly::
15 | 1 | 1 | 266µs | 266µs | init | Test::Deep::ArrayElementsOnly::
1 | 1 | 1 | 63µs | 80µs | BEGIN@1.19 | Test::Deep::
1 | 1 | 1 | 33µs | 61µs | BEGIN@2.20 | Test::Deep::
1 | 1 | 1 | 30µs | 112µs | BEGIN@6 | Test::Deep::ArrayElementsOnly::
0 | 0 | 0 | 0s | 0s | render_stack | Test::Deep::ArrayElementsOnly::
0 | 0 | 0 | 0s | 0s | reset_arrow | Test::Deep::ArrayElementsOnly::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 108µs | 2 | 97µs | # spent 80µs (63+17) within Test::Deep::BEGIN@1.19 which was called:
# once (63µs+17µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep.pm:80] at line 1 # spent 80µs making 1 call to Test::Deep::BEGIN@1.19
# spent 17µs making 1 call to strict::import |
2 | 2 | 134µs | 2 | 88µs | # spent 61µs (33+27) within Test::Deep::BEGIN@2.20 which was called:
# once (33µs+27µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep.pm:80] at line 2 # spent 61µs making 1 call to Test::Deep::BEGIN@2.20
# spent 27µs making 1 call to warnings::import |
3 | |||||
4 | package Test::Deep::ArrayElementsOnly; | ||||
5 | |||||
6 | 2 | 960µs | 2 | 194µs | # spent 112µs (30+82) within Test::Deep::ArrayElementsOnly::BEGIN@6 which was called:
# once (30µs+82µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep.pm:80] at line 6 # spent 112µs making 1 call to Test::Deep::ArrayElementsOnly::BEGIN@6
# spent 82µs making 1 call to Test::Deep::Cmp::import |
7 | |||||
8 | sub init | ||||
9 | # spent 266µs within Test::Deep::ArrayElementsOnly::init which was called 15 times, avg 18µs/call:
# 15 times (266µs+0s) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 18µs/call | ||||
10 | 45 | 416µs | my $self = shift; | ||
11 | |||||
12 | my $val = shift; | ||||
13 | |||||
14 | $self->{val} = $val; | ||||
15 | } | ||||
16 | |||||
17 | sub descend | ||||
18 | # spent 2.09ms (956µs+1.13) within Test::Deep::ArrayElementsOnly::descend which was called 15 times, avg 139µs/call:
# 15 times (956µs+1.13ms) by Test::Deep::descend at line 328 of Test/Deep.pm, avg 139µs/call | ||||
19 | 90 | 499µs | my $self = shift; | ||
20 | my $got = shift; | ||||
21 | |||||
22 | my $exp = $self->{val}; | ||||
23 | |||||
24 | 15 | 932µs | my $data = $self->data; # spent 932µs making 15 calls to Test::Deep::Cmp::data, avg 62µs/call | ||
25 | |||||
26 | for my $i (0..$#{$exp}) | ||||
27 | { | ||||
28 | 60 | 396µs | $data->{index} = $i; | ||
29 | |||||
30 | my $got_elem = $got->[$i]; | ||||
31 | my $exp_elem = $exp->[$i]; | ||||
32 | |||||
33 | 15 | 0s | return 0 unless Test::Deep::descend($got_elem, $exp_elem) # spent 199µs making 15 calls to Test::Deep::descend, avg 13µs/call, recursion: max depth 2, sum of overlapping time 199µs | ||
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 | 10µs | 1; |