| File | /usr/local/lib/perl5/5.10.1/Test/Deep/MM.pm |
| Statements Executed | 118 |
| Statement Execution Time | 553µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 72 | 4 | 1 | 90µs | 90µs | Test::Deep::MM::__ANON__[:25] |
| 1 | 1 | 1 | 61µs | 64µs | Test::Deep::MM::import |
| 1 | 1 | 1 | 20µs | 80µs | Test::Deep::MM::new |
| 1 | 1 | 1 | 12µs | 15µs | Test::Deep::Stack::BEGIN@1 |
| 1 | 1 | 1 | 6µs | 16µs | Test::Deep::MM::BEGIN@16 |
| 1 | 1 | 1 | 6µs | 16µs | Test::Deep::MM::BEGIN@31 |
| 1 | 1 | 1 | 6µs | 14µs | Test::Deep::Stack::BEGIN@2 |
| 1 | 1 | 1 | 4µs | 4µs | Test::Deep::MM::__ANON__[:28] |
| 1 | 1 | 1 | 4µs | 4µs | Test::Deep::MM::init |
| 4 | 1 | 2 | 3µs | 3µs | Test::Deep::MM::CORE:match (opcode) |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | 3 | 19µs | 2 | 18µs | # spent 15µs (12+3) within Test::Deep::Stack::BEGIN@1 which was called
# once (12µs+3µs) by Test::Deep::Stack::BEGIN@8 at line 1 # spent 15µs making 1 call to Test::Deep::Stack::BEGIN@1
# spent 3µs making 1 call to strict::import |
| 2 | 3 | 62µs | 2 | 22µs | # spent 14µs (6+8) within Test::Deep::Stack::BEGIN@2 which was called
# once (6µs+8µs) by Test::Deep::Stack::BEGIN@8 at line 2 # spent 14µs making 1 call to Test::Deep::Stack::BEGIN@2
# spent 8µs making 1 call to warnings::import |
| 3 | |||||
| 4 | package Test::Deep::MM; | ||||
| 5 | |||||
| 6 | sub import | ||||
| 7 | # spent 64µs (61+3) within Test::Deep::MM::import which was called
# once (61µs+3µs) by Test::Deep::Stack::BEGIN@8 at line 8 of Test/Deep/Stack.pm | ||||
| 8 | 26 | 61µs | my $self = shift; | ||
| 9 | |||||
| 10 | my ($pkg) = caller(); | ||||
| 11 | my $mpkg = $pkg."::Methods"; | ||||
| 12 | foreach my $attr (@_) | ||||
| 13 | { | ||||
| 14 | if ($attr =~ /^[a-z]/) # spent 3µs making 4 calls to Test::Deep::MM::CORE:match, avg 775ns/call | ||||
| 15 | { | ||||
| 16 | 3 | 92µs | 2 | 27µs | # spent 16µs (6+10) within Test::Deep::MM::BEGIN@16 which was called
# once (6µs+10µs) by Test::Deep::Stack::BEGIN@8 at line 16 # spent 16µs making 1 call to Test::Deep::MM::BEGIN@16
# spent 10µs making 1 call to strict::unimport |
| 17 | *{$mpkg."::$attr"} = \&{$attr}; | ||||
| 18 | } | ||||
| 19 | else | ||||
| 20 | { | ||||
| 21 | my $get_name = $mpkg."::get$attr"; | ||||
| 22 | my $set_name = $mpkg."::set$attr"; | ||||
| 23 | # spent 90µs within Test::Deep::MM::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep/MM.pm:25] which was called 72 times, avg 1µs/call:
# 32 times (47µs+0s) by Test::Deep::Stack::push at line 23 of Test/Deep/Stack.pm, avg 1µs/call
# 32 times (31µs+0s) by Test::Deep::Stack::pop at line 30 of Test/Deep/Stack.pm, avg 981ns/call
# 7 times (7µs+0s) by Test::Deep::Stack::getLast at line 64 of Test/Deep/Stack.pm, avg 1µs/call
# once (4µs+0s) by Test::Deep::Stack::init at line 16 of Test/Deep/Stack.pm | ||||
| 24 | 72 | 154µs | return $_[0]->{$attr}; | ||
| 25 | }; | ||||
| 26 | # spent 4µs within Test::Deep::MM::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep/MM.pm:28] which was called
# once (4µs+0s) by Test::Deep::Stack::init at line 16 of Test/Deep/Stack.pm | ||||
| 27 | 1 | 8µs | return $_[0]->{$attr} = $_[1]; | ||
| 28 | }; | ||||
| 29 | |||||
| 30 | { | ||||
| 31 | 3 | 127µs | 2 | 25µs | # spent 16µs (6+10) within Test::Deep::MM::BEGIN@31 which was called
# once (6µs+10µs) by Test::Deep::Stack::BEGIN@8 at line 31 # spent 16µs making 1 call to Test::Deep::MM::BEGIN@31
# spent 10µs making 1 call to strict::unimport |
| 32 | *$get_name = $get_sub; | ||||
| 33 | *$set_name = $set_sub; | ||||
| 34 | push(@{$pkg."::ISA"}, $mpkg); | ||||
| 35 | } | ||||
| 36 | } | ||||
| 37 | } | ||||
| 38 | } | ||||
| 39 | |||||
| 40 | sub new | ||||
| 41 | # spent 80µs (20+60) within Test::Deep::MM::new which was called
# once (20µs+60µs) by Test::Deep::cmp_details at line 143 of Test/Deep.pm | ||||
| 42 | 4 | 19µs | my $pkg = shift; | ||
| 43 | |||||
| 44 | my $self = bless {}, $pkg; | ||||
| 45 | |||||
| 46 | $self->init(@_); # spent 60µs making 1 call to Test::Deep::Stack::init | ||||
| 47 | |||||
| 48 | return $self; | ||||
| 49 | } | ||||
| 50 | |||||
| 51 | sub init | ||||
| 52 | # spent 4µs within Test::Deep::MM::init which was called
# once (4µs+0s) by Test::Deep::Stack::init at line 14 of Test/Deep/Stack.pm | ||||
| 53 | 2 | 8µs | my $self = shift; | ||
| 54 | |||||
| 55 | while (@_) | ||||
| 56 | { | ||||
| 57 | my $name = shift || confess("No name"); | ||||
| 58 | |||||
| 59 | my $method = "set$name"; | ||||
| 60 | $self->$method(shift); | ||||
| 61 | } | ||||
| 62 | } | ||||
| 63 | |||||
| 64 | 1 | 2µs | 1; | ||
# spent 3µs within Test::Deep::MM::CORE:match which was called 4 times, avg 775ns/call:
# 4 times (3µs+0s) by Test::Deep::MM::import at line 14 of Test/Deep/MM.pm, avg 775ns/call |