File | /usr/local/lib/perl5/5.10.1/Test/Deep/ArrayLengthOnly.pm |
Statements Executed | 17 |
Statement Execution Time | 253µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 7µs | 20µs | BEGIN@6 | Test::Deep::ArrayLengthOnly::
1 | 1 | 1 | 3µs | 3µs | descend | Test::Deep::ArrayLengthOnly::
1 | 1 | 1 | 2µs | 2µs | init | Test::Deep::ArrayLengthOnly::
0 | 0 | 0 | 0s | 0s | renderExp | Test::Deep::ArrayLengthOnly::
0 | 0 | 0 | 0s | 0s | renderGot | Test::Deep::ArrayLengthOnly::
0 | 0 | 0 | 0s | 0s | renderVal | Test::Deep::ArrayLengthOnly::
0 | 0 | 0 | 0s | 0s | render_stack | Test::Deep::ArrayLengthOnly::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 3 | 20µs | 2 | 20µs | use strict; # spent 17µs making 1 call to Test::Deep::BEGIN@1
# spent 3µs making 1 call to strict::import |
2 | 3 | 29µs | 2 | 29µs | use warnings; # spent 20µs making 1 call to Test::Deep::BEGIN@2
# spent 9µs making 1 call to warnings::import |
3 | |||||
4 | package Test::Deep::ArrayLengthOnly; | ||||
5 | |||||
6 | 3 | 191µs | 2 | 32µs | # spent 20µs (7+13) within Test::Deep::ArrayLengthOnly::BEGIN@6 which was called
# once (7µs+13µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 6 # spent 20µs making 1 call to Test::Deep::ArrayLengthOnly::BEGIN@6
# spent 13µs making 1 call to Test::Deep::Cmp::import |
7 | |||||
8 | sub init | ||||
9 | # spent 2µs within Test::Deep::ArrayLengthOnly::init which was called
# once (2µs+0s) by Test::Deep::Cmp::new at line 32 of Test/Deep/Cmp.pm | ||||
10 | 1 | 200ns | my $self = shift; | ||
11 | |||||
12 | 1 | 100ns | my $val = shift; | ||
13 | |||||
14 | 1 | 6µs | $self->{val} = $val; | ||
15 | } | ||||
16 | |||||
17 | sub descend | ||||
18 | # spent 3µs within Test::Deep::ArrayLengthOnly::descend which was called
# once (3µs+0s) by Test::Deep::descend at line 312 of Test/Deep.pm | ||||
19 | 1 | 300ns | my $self = shift; | ||
20 | 1 | 200ns | my $got = shift; | ||
21 | |||||
22 | 1 | 500ns | my $len = $self->{val}; | ||
23 | |||||
24 | 1 | 4µs | return @$got == $len; | ||
25 | } | ||||
26 | |||||
27 | sub render_stack | ||||
28 | { | ||||
29 | my $self = shift; | ||||
30 | my ($var, $data) = @_; | ||||
31 | |||||
32 | return "array length of $var"; | ||||
33 | } | ||||
34 | |||||
35 | sub renderVal | ||||
36 | { | ||||
37 | my $self = shift; | ||||
38 | |||||
39 | my $val = shift; | ||||
40 | |||||
41 | return "array with $val element(s)" | ||||
42 | } | ||||
43 | |||||
44 | sub renderGot | ||||
45 | { | ||||
46 | my $self = shift; | ||||
47 | |||||
48 | my $got = shift; | ||||
49 | |||||
50 | return $self->renderVal(@$got + 0); | ||||
51 | } | ||||
52 | |||||
53 | sub renderExp | ||||
54 | { | ||||
55 | my $self = shift; | ||||
56 | |||||
57 | return $self->renderVal($self->{val}); | ||||
58 | } | ||||
59 | |||||
60 | 1 | 3µs | 1; |