File | /usr/local/lib/perl5/5.10.1/Test/Deep/RefType.pm |
Statements Executed | 34 |
Statement Execution Time | 331µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
3 | 1 | 1 | 31µs | 759µs | descend | Test::Deep::RefType::
1 | 1 | 1 | 15µs | 30µs | BEGIN@6 | Test::Deep::RefType::
1 | 1 | 1 | 9µs | 42µs | BEGIN@8 | Test::Deep::RefType::
3 | 1 | 1 | 7µs | 7µs | init | Test::Deep::RefType::
0 | 0 | 0 | 0s | 0s | renderGot | Test::Deep::RefType::
0 | 0 | 0 | 0s | 0s | render_stack | Test::Deep::RefType::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 3 | 28µs | 2 | 26µs | use strict; # spent 22µs making 1 call to Test::Deep::BEGIN@1
# spent 4µs making 1 call to strict::import |
2 | 3 | 35µs | 2 | 33µs | use warnings; # spent 21µs making 1 call to Test::Deep::BEGIN@2
# spent 12µs making 1 call to warnings::import |
3 | |||||
4 | package Test::Deep::RefType; | ||||
5 | |||||
6 | 3 | 33µs | 2 | 45µs | # spent 30µs (15+15) within Test::Deep::RefType::BEGIN@6 which was called
# once (15µs+15µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 6 # spent 30µs making 1 call to Test::Deep::RefType::BEGIN@6
# spent 15µs making 1 call to Test::Deep::Cmp::import |
7 | |||||
8 | 3 | 183µs | 2 | 74µs | # spent 42µs (9+32) within Test::Deep::RefType::BEGIN@8 which was called
# once (9µs+32µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 8 # spent 42µs making 1 call to Test::Deep::RefType::BEGIN@8
# spent 32µs making 1 call to Exporter::import |
9 | |||||
10 | sub init | ||||
11 | # spent 7µs within Test::Deep::RefType::init which was called 3 times, avg 2µs/call:
# 3 times (7µs+0s) by Test::Deep::Cmp::new at line 32 of Test/Deep/Cmp.pm, avg 2µs/call | ||||
12 | 6 | 13µs | my $self = shift; | ||
13 | |||||
14 | $self->{val} = shift; | ||||
15 | } | ||||
16 | |||||
17 | sub descend | ||||
18 | # spent 759µs (31+728) within Test::Deep::RefType::descend which was called 3 times, avg 253µs/call:
# 3 times (31µs+728µs) by Test::Deep::descend at line 312 of Test/Deep.pm, avg 253µs/call | ||||
19 | 15 | 35µs | my $self = shift; | ||
20 | |||||
21 | my $got = shift; | ||||
22 | |||||
23 | my $exp = $self->{val}; | ||||
24 | my $reftype = reftype($got); # spent 2µs making 3 calls to Scalar::Util::reftype, avg 667ns/call | ||||
25 | |||||
26 | return Test::Deep::descend($reftype, Test::Deep::shallow($exp)); # spent 594µs making 3 calls to Test::Deep::__ANON__[Test/Deep.pm:92], avg 198µs/call
# spent 132µs making 3 calls to Test::Deep::descend, avg 44µs/call, recursion: max depth 5, time 132µs | ||||
27 | } | ||||
28 | |||||
29 | sub render_stack | ||||
30 | { | ||||
31 | my $self = shift; | ||||
32 | my $var = shift; | ||||
33 | |||||
34 | return "reftype($var)"; | ||||
35 | } | ||||
36 | |||||
37 | sub renderGot | ||||
38 | { | ||||
39 | my $self = shift; | ||||
40 | |||||
41 | my $got = shift; | ||||
42 | |||||
43 | $self->SUPER::renderGot(reftype($got)); | ||||
44 | } | ||||
45 | |||||
46 | 1 | 3µs | 1; |