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