| Filename | /home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep/RefType.pm |
| Statements | Executed 23 statements in 287µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 1 | 1 | 25µs | 662µs | Test::Deep::RefType::descend |
| 1 | 1 | 1 | 15µs | 29µs | Test::Deep::BEGIN@1.16 |
| 1 | 1 | 1 | 13µs | 28µs | Test::Deep::RefType::BEGIN@6 |
| 1 | 1 | 1 | 10µs | 14µs | Test::Deep::BEGIN@2.17 |
| 1 | 1 | 1 | 10µs | 38µs | Test::Deep::RefType::BEGIN@8 |
| 2 | 1 | 1 | 6µs | 6µs | Test::Deep::RefType::init |
| 0 | 0 | 0 | 0s | 0s | Test::Deep::RefType::renderGot |
| 0 | 0 | 0 | 0s | 0s | Test::Deep::RefType::render_stack |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | 2 | 27µs | 2 | 43µs | # spent 29µs (15+14) within Test::Deep::BEGIN@1.16 which was called:
# once (15µs+14µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 1 # spent 29µs making 1 call to Test::Deep::BEGIN@1.16
# spent 14µs making 1 call to strict::import |
| 2 | 2 | 33µs | 2 | 19µs | # spent 14µs (10+4) within Test::Deep::BEGIN@2.17 which was called:
# once (10µs+4µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 2 # spent 14µs making 1 call to Test::Deep::BEGIN@2.17
# spent 4µs making 1 call to warnings::import |
| 3 | |||||
| 4 | package Test::Deep::RefType; | ||||
| 5 | |||||
| 6 | 2 | 29µs | 2 | 42µs | # spent 28µs (13+15) within Test::Deep::RefType::BEGIN@6 which was called:
# once (13µs+15µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 6 # spent 28µs making 1 call to Test::Deep::RefType::BEGIN@6
# spent 15µs making 1 call to Test::Deep::Cmp::import |
| 7 | |||||
| 8 | 2 | 157µs | 2 | 67µs | # spent 38µs (10+29) within Test::Deep::RefType::BEGIN@8 which was called:
# once (10µs+29µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 8 # spent 38µs making 1 call to Test::Deep::RefType::BEGIN@8
# spent 29µs making 1 call to Exporter::import |
| 9 | |||||
| 10 | sub init | ||||
| 11 | # spent 6µs within Test::Deep::RefType::init which was called 2 times, avg 3µs/call:
# 2 times (6µs+0s) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 3µs/call | ||||
| 12 | 2 | 500ns | my $self = shift; | ||
| 13 | |||||
| 14 | 2 | 10µs | $self->{val} = shift; | ||
| 15 | } | ||||
| 16 | |||||
| 17 | sub descend | ||||
| 18 | # spent 662µs (25+637) within Test::Deep::RefType::descend which was called 2 times, avg 331µs/call:
# 2 times (25µs+637µs) by Test::Deep::descend at line 344 of Test/Deep.pm, avg 331µs/call | ||||
| 19 | 2 | 900ns | my $self = shift; | ||
| 20 | |||||
| 21 | 2 | 600ns | my $got = shift; | ||
| 22 | |||||
| 23 | 2 | 2µs | my $exp = $self->{val}; | ||
| 24 | 2 | 7µs | 2 | 1µs | my $reftype = reftype($got); # spent 1µs making 2 calls to Scalar::Util::reftype, avg 700ns/call |
| 25 | |||||
| 26 | 2 | 17µs | 4 | 524µs | return Test::Deep::descend($reftype, Test::Deep::shallow($exp)); # spent 524µs making 2 calls to Test::Deep::__ANON__[Test/Deep.pm:81], avg 262µs/call
# spent 112µs making 2 calls to Test::Deep::descend, avg 56µs/call, recursion: max depth 4, sum of overlapping time 112µ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 | 2µs | 1; |