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 | __ANON__[:25] | Test::Deep::MM::
1 | 1 | 1 | 61µs | 64µs | import | Test::Deep::MM::
1 | 1 | 1 | 20µs | 80µs | new | Test::Deep::MM::
1 | 1 | 1 | 12µs | 15µs | BEGIN@1 | Test::Deep::Stack::
1 | 1 | 1 | 6µs | 16µs | BEGIN@16 | Test::Deep::MM::
1 | 1 | 1 | 6µs | 16µs | BEGIN@31 | Test::Deep::MM::
1 | 1 | 1 | 6µs | 14µs | BEGIN@2 | Test::Deep::Stack::
1 | 1 | 1 | 4µs | 4µs | __ANON__[:28] | Test::Deep::MM::
1 | 1 | 1 | 4µs | 4µs | init | Test::Deep::MM::
4 | 1 | 2 | 3µs | 3µs | CORE:match (opcode) | Test::Deep::MM::
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 | 1 | 800ns | my $self = shift; | ||
9 | |||||
10 | 1 | 2µs | my ($pkg) = caller(); | ||
11 | 1 | 600ns | my $mpkg = $pkg."::Methods"; | ||
12 | 1 | 4µs | foreach my $attr (@_) | ||
13 | { | ||||
14 | 4 | 15µs | 4 | 3µs | 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 | 2 | 7µs | *{$mpkg."::$attr"} = \&{$attr}; | ||
18 | } | ||||
19 | else | ||||
20 | { | ||||
21 | 2 | 2µs | my $get_name = $mpkg."::get$attr"; | ||
22 | 2 | 900ns | 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 | 2 | 3µs | }; | ||
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 | 2 | 2µs | }; | ||
29 | |||||
30 | { | ||||
31 | 5 | 128µ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 | 2 | 5µs | *$get_name = $get_sub; | ||
33 | 2 | 8µs | *$set_name = $set_sub; | ||
34 | 2 | 12µs | 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 | 1 | 1µs | my $pkg = shift; | ||
43 | |||||
44 | 1 | 10µs | my $self = bless {}, $pkg; | ||
45 | |||||
46 | 1 | 4µs | 1 | 60µs | $self->init(@_); # spent 60µs making 1 call to Test::Deep::Stack::init |
47 | |||||
48 | 1 | 4µs | 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 | 1 | 700ns | my $self = shift; | ||
54 | |||||
55 | 1 | 7µs | 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 |