Filename | /opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Class/MOP/Method/Generated.pm |
Statements | Executed 1820 statements in 3.77ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
129 | 7 | 4 | 1.96ms | 51.3ms | _compile_code | Class::MOP::Method::Generated::
1 | 1 | 1 | 1.58ms | 1.89ms | BEGIN@14 | Class::MOP::Method::Generated::
129 | 1 | 1 | 1.13ms | 1.22ms | _generate_description | Class::MOP::Method::Generated::
1 | 1 | 1 | 11µs | 11µs | BEGIN@3 | Class::MOP::Method::Generated::
1 | 1 | 1 | 10µs | 81µs | BEGIN@16 | Class::MOP::Method::Generated::
1 | 1 | 1 | 10µs | 14µs | BEGIN@11 | Class::MOP::Method::Generated::
1 | 1 | 1 | 9µs | 39µs | BEGIN@13 | Class::MOP::Method::Generated::
1 | 1 | 1 | 8µs | 24µs | BEGIN@10 | Class::MOP::Method::Generated::
0 | 0 | 0 | 0s | 0s | _initialize_body | Class::MOP::Method::Generated::
0 | 0 | 0 | 0s | 0s | new | Class::MOP::Method::Generated::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | |||||
2 | package Class::MOP::Method::Generated; | ||||
3 | # spent 11µs within Class::MOP::Method::Generated::BEGIN@3 which was called:
# once (11µs+0s) by base::import at line 5 | ||||
4 | 1 | 11µs | $Class::MOP::Method::Generated::AUTHORITY = 'cpan:STEVAN'; | ||
5 | 1 | 47µs | 1 | 11µs | } # spent 11µs making 1 call to Class::MOP::Method::Generated::BEGIN@3 |
6 | { | ||||
7 | 2 | 1µs | $Class::MOP::Method::Generated::VERSION = '2.1005'; | ||
8 | } | ||||
9 | |||||
10 | 2 | 36µs | 2 | 39µs | # spent 24µs (8+15) within Class::MOP::Method::Generated::BEGIN@10 which was called:
# once (8µs+15µs) by base::import at line 10 # spent 24µs making 1 call to Class::MOP::Method::Generated::BEGIN@10
# spent 15µs making 1 call to strict::import |
11 | 2 | 33µs | 2 | 19µs | # spent 14µs (10+5) within Class::MOP::Method::Generated::BEGIN@11 which was called:
# once (10µs+5µs) by base::import at line 11 # spent 14µs making 1 call to Class::MOP::Method::Generated::BEGIN@11
# spent 5µs making 1 call to warnings::import |
12 | |||||
13 | 2 | 32µs | 2 | 69µs | # spent 39µs (9+30) within Class::MOP::Method::Generated::BEGIN@13 which was called:
# once (9µs+30µs) by base::import at line 13 # spent 39µs making 1 call to Class::MOP::Method::Generated::BEGIN@13
# spent 30µs making 1 call to Exporter::import |
14 | 2 | 149µs | 2 | 1.92ms | # spent 1.89ms (1.58+300µs) within Class::MOP::Method::Generated::BEGIN@14 which was called:
# once (1.58ms+300µs) by base::import at line 14 # spent 1.89ms making 1 call to Class::MOP::Method::Generated::BEGIN@14
# spent 34µs making 1 call to Exporter::import |
15 | |||||
16 | 2 | 342µs | 2 | 81µs | # spent 81µs (10+72) within Class::MOP::Method::Generated::BEGIN@16 which was called:
# once (10µs+72µs) by base::import at line 16 # spent 81µs making 1 call to Class::MOP::Method::Generated::BEGIN@16
# spent 72µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 72µs |
17 | |||||
18 | ## accessors | ||||
19 | |||||
20 | sub new { | ||||
21 | confess __PACKAGE__ . " is an abstract base class, you must provide a constructor."; | ||||
22 | } | ||||
23 | |||||
24 | sub _initialize_body { | ||||
25 | confess "No body to initialize, " . __PACKAGE__ . " is an abstract base class"; | ||||
26 | } | ||||
27 | |||||
28 | # spent 1.22ms (1.13+90µs) within Class::MOP::Method::Generated::_generate_description which was called 129 times, avg 9µs/call:
# 129 times (1.13ms+90µs) by Class::MOP::Method::Generated::_compile_code at line 63, avg 9µs/call | ||||
29 | 129 | 28µs | my ( $self, $context ) = @_; | ||
30 | 129 | 412µs | 129 | 90µs | $context ||= $self->definition_context; # spent 90µs making 129 calls to Class::MOP::Method::Generated::definition_context, avg 698ns/call |
31 | |||||
32 | 129 | 30µs | my $desc = "generated method"; | ||
33 | 129 | 15µs | my $origin = "unknown origin"; | ||
34 | |||||
35 | 129 | 45µs | if (defined $context) { | ||
36 | 129 | 74µs | if (defined $context->{description}) { | ||
37 | $desc = $context->{description}; | ||||
38 | } | ||||
39 | |||||
40 | 129 | 253µs | if (defined $context->{file} || defined $context->{line}) { | ||
41 | $origin = "defined at " | ||||
42 | . (defined $context->{file} | ||||
43 | ? $context->{file} : "<unknown file>") | ||||
44 | . " line " | ||||
45 | . (defined $context->{line} | ||||
46 | ? $context->{line} : "<unknown line>"); | ||||
47 | } | ||||
48 | } | ||||
49 | |||||
50 | 129 | 385µs | return "$desc ($origin)"; | ||
51 | } | ||||
52 | |||||
53 | # spent 51.3ms (1.96+49.3) within Class::MOP::Method::Generated::_compile_code which was called 129 times, avg 398µs/call:
# 53 times (751µs+9.82ms) by Class::MOP::Method::Accessor::try {...} at line 142 of Class/MOP/Method/Accessor.pm, avg 199µs/call
# 31 times (533µs+31.2ms) by Class::MOP::Method::Constructor::try {...} at line 110 of Class/MOP/Method/Constructor.pm, avg 1.02ms/call
# 22 times (308µs+3.92ms) by Class::MOP::Method::Accessor::try {...} at line 112 of Class/MOP/Method/Accessor.pm, avg 192µs/call
# 16 times (227µs+2.51ms) by Class::MOP::Method::Accessor::try {...} at line 204 of Class/MOP/Method/Accessor.pm, avg 171µs/call
# 3 times (75µs+1.18ms) by Moose::Meta::Method::Accessor::try {...} at line 38 of Moose/Meta/Method/Accessor.pm, avg 418µs/call
# 3 times (41µs+481µs) by Class::MOP::Method::Accessor::try {...} at line 179 of Class/MOP/Method/Accessor.pm, avg 174µs/call
# once (23µs+199µs) by Moose::Meta::Method::Destructor::try {...} at line 97 of Moose/Meta/Method/Destructor.pm | ||||
54 | 129 | 65µs | my ( $self, @args ) = @_; | ||
55 | 129 | 156µs | unshift @args, 'source' if @args % 2; | ||
56 | 129 | 120µs | my %args = @args; | ||
57 | |||||
58 | 129 | 69µs | my $context = delete $args{context}; | ||
59 | 129 | 598µs | 163 | 12.8ms | my $environment = $self->can('_eval_environment') # spent 12.3ms making 31 calls to Class::MOP::Method::Constructor::_eval_environment, avg 396µs/call
# spent 338µs making 3 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 113µs/call
# spent 178µs making 129 calls to UNIVERSAL::can, avg 1µs/call |
60 | ? $self->_eval_environment | ||||
61 | : {}; | ||||
62 | |||||
63 | 129 | 869µs | 258 | 36.5ms | return eval_closure( # spent 35.3ms making 129 calls to Eval::Closure::eval_closure, avg 274µs/call
# spent 1.22ms making 129 calls to Class::MOP::Method::Generated::_generate_description, avg 9µs/call |
64 | environment => $environment, | ||||
65 | description => $self->_generate_description($context), | ||||
66 | %args, | ||||
67 | ); | ||||
68 | } | ||||
69 | |||||
70 | 1 | 3µs | 1; | ||
71 | |||||
72 | # ABSTRACT: Abstract base class for generated methods | ||||
73 | |||||
74 | __END__ |