| Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/MM.pm |
| Statements | Executed 491 statements in 7.87ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 330 | 4 | 1 | 2.42ms | 2.42ms | Test::Deep::MM::__ANON__[:25] |
| 18 | 1 | 1 | 1.14ms | 4.14ms | Test::Deep::MM::new |
| 18 | 1 | 1 | 452µs | 452µs | Test::Deep::MM::__ANON__[:28] |
| 18 | 1 | 1 | 346µs | 346µs | Test::Deep::MM::init |
| 1 | 1 | 1 | 274µs | 298µs | Test::Deep::MM::import |
| 1 | 1 | 1 | 55µs | 66µs | Test::Deep::Stack::BEGIN@1 |
| 1 | 1 | 1 | 39µs | 91µs | Test::Deep::MM::BEGIN@16 |
| 1 | 1 | 1 | 28µs | 51µs | Test::Deep::Stack::BEGIN@2 |
| 1 | 1 | 1 | 25µs | 61µs | Test::Deep::MM::BEGIN@31 |
| 4 | 1 | 1 | 23µs | 23µs | Test::Deep::MM::CORE:match (opcode) |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | 2 | 143µs | 2 | 78µs | # spent 66µs (55+12) within Test::Deep::Stack::BEGIN@1 which was called:
# once (55µs+12µs) by Test::Deep::Stack::BEGIN@9 at line 1 # spent 66µs making 1 call to Test::Deep::Stack::BEGIN@1
# spent 12µs making 1 call to strict::import |
| 2 | 2 | 371µs | 2 | 74µs | # spent 51µs (28+23) within Test::Deep::Stack::BEGIN@2 which was called:
# once (28µs+23µs) by Test::Deep::Stack::BEGIN@9 at line 2 # spent 51µs making 1 call to Test::Deep::Stack::BEGIN@2
# spent 23µs making 1 call to warnings::import |
| 3 | |||||
| 4 | package Test::Deep::MM; | ||||
| 5 | |||||
| 6 | sub import | ||||
| 7 | # spent 298µs (274+23) within Test::Deep::MM::import which was called:
# once (274µs+23µs) by Test::Deep::Stack::BEGIN@9 at line 9 of Test/Deep/Stack.pm | ||||
| 8 | 26 | 304µs | my $self = shift; | ||
| 9 | |||||
| 10 | my ($pkg) = caller(); | ||||
| 11 | my $mpkg = $pkg."::Methods"; | ||||
| 12 | foreach my $attr (@_) | ||||
| 13 | { | ||||
| 14 | 4 | 23µs | if ($attr =~ /^[a-z]/) # spent 23µs making 4 calls to Test::Deep::MM::CORE:match, avg 6µs/call | ||
| 15 | { | ||||
| 16 | 2 | 473µs | 2 | 143µs | # spent 91µs (39+52) within Test::Deep::MM::BEGIN@16 which was called:
# once (39µs+52µs) by Test::Deep::Stack::BEGIN@9 at line 16 # spent 91µs making 1 call to Test::Deep::MM::BEGIN@16
# spent 52µ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 2.42ms within Test::Deep::MM::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/MM.pm:25] which was called 330 times, avg 7µs/call:
# 144 times (1.04ms+0s) by Test::Deep::Stack::push at line 24 of Test/Deep/Stack.pm, avg 7µs/call
# 144 times (814µs+0s) by Test::Deep::Stack::pop at line 31 of Test/Deep/Stack.pm, avg 6µs/call
# 24 times (184µs+0s) by Test::Deep::Stack::getLast at line 65 of Test/Deep/Stack.pm, avg 8µs/call
# 18 times (377µs+0s) by Test::Deep::Stack::init at line 17 of Test/Deep/Stack.pm, avg 21µs/call | ||||
| 24 | 330 | 3.85ms | return $_[0]->{$attr}; | ||
| 25 | }; | ||||
| 26 | # spent 452µs within Test::Deep::MM::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/MM.pm:28] which was called 18 times, avg 25µs/call:
# 18 times (452µs+0s) by Test::Deep::Stack::init at line 17 of Test/Deep/Stack.pm, avg 25µs/call | ||||
| 27 | 18 | 448µs | return $_[0]->{$attr} = $_[1]; | ||
| 28 | }; | ||||
| 29 | |||||
| 30 | { | ||||
| 31 | 2 | 645µs | 2 | 96µs | # spent 61µs (25+35) within Test::Deep::MM::BEGIN@31 which was called:
# once (25µs+35µs) by Test::Deep::Stack::BEGIN@9 at line 31 # spent 61µs making 1 call to Test::Deep::MM::BEGIN@31
# spent 35µ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 4.14ms (1.14+3.00) within Test::Deep::MM::new which was called 18 times, avg 230µs/call:
# 18 times (1.14ms+3.00ms) by Test::Deep::cmp_details at line 147 of Test/Deep.pm, avg 230µs/call | ||||
| 42 | 72 | 1.19ms | my $pkg = shift; | ||
| 43 | |||||
| 44 | my $self = bless {}, $pkg; | ||||
| 45 | |||||
| 46 | 18 | 3.00ms | $self->init(@_); # spent 3.00ms making 18 calls to Test::Deep::Stack::init, avg 167µs/call | ||
| 47 | |||||
| 48 | return $self; | ||||
| 49 | } | ||||
| 50 | |||||
| 51 | sub init | ||||
| 52 | # spent 346µs within Test::Deep::MM::init which was called 18 times, avg 19µs/call:
# 18 times (346µs+0s) by Test::Deep::Stack::init at line 15 of Test/Deep/Stack.pm, avg 19µs/call | ||||
| 53 | 36 | 437µ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 | 10µs | 1; | ||
# spent 23µs within Test::Deep::MM::CORE:match which was called 4 times, avg 6µs/call:
# 4 times (23µs+0s) by Test::Deep::MM::import at line 14, avg 6µs/call |