Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/Class/MOP/Method/Generated.pm |
Statements | Executed 1844 statements in 1.98ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
131 | 7 | 4 | 1.04ms | 25.6ms | _compile_code | Class::MOP::Method::Generated::
1 | 1 | 1 | 756µs | 925µs | BEGIN@7 | Class::MOP::Method::Generated::
131 | 1 | 1 | 575µs | 613µs | _generate_description | Class::MOP::Method::Generated::
1 | 1 | 1 | 11µs | 13µs | BEGIN@4 | Class::MOP::Method::Generated::
1 | 1 | 1 | 7µs | 25µs | BEGIN@9 | Class::MOP::Method::Generated::
1 | 1 | 1 | 5µs | 10µs | BEGIN@5 | 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 | package Class::MOP::Method::Generated; | ||||
2 | 1 | 200ns | our $VERSION = '2.1605'; | ||
3 | |||||
4 | 2 | 15µs | 2 | 16µs | # spent 13µs (11+3) within Class::MOP::Method::Generated::BEGIN@4 which was called:
# once (11µs+3µs) by parent::import at line 4 # spent 13µs making 1 call to Class::MOP::Method::Generated::BEGIN@4
# spent 3µs making 1 call to strict::import |
5 | 2 | 16µs | 2 | 16µs | # spent 10µs (5+6) within Class::MOP::Method::Generated::BEGIN@5 which was called:
# once (5µs+6µs) by parent::import at line 5 # spent 10µs making 1 call to Class::MOP::Method::Generated::BEGIN@5
# spent 6µs making 1 call to warnings::import |
6 | |||||
7 | 2 | 71µs | 2 | 944µs | # spent 925µs (756+169) within Class::MOP::Method::Generated::BEGIN@7 which was called:
# once (756µs+169µs) by parent::import at line 7 # spent 925µs making 1 call to Class::MOP::Method::Generated::BEGIN@7
# spent 19µs making 1 call to Exporter::import |
8 | |||||
9 | 2 | 152µs | 2 | 25µs | # spent 25µs (7+18) within Class::MOP::Method::Generated::BEGIN@9 which was called:
# once (7µs+18µs) by parent::import at line 9 # spent 25µs making 1 call to Class::MOP::Method::Generated::BEGIN@9
# spent 18µs making 1 call to parent::import, recursion: max depth 1, sum of overlapping time 18µs |
10 | |||||
11 | ## accessors | ||||
12 | |||||
13 | sub new { | ||||
14 | $_[0]->_throw_exception( CannotCallAnAbstractBaseMethod => package_name => __PACKAGE__ ); | ||||
15 | } | ||||
16 | |||||
17 | sub _initialize_body { | ||||
18 | $_[0]->_throw_exception( NoBodyToInitializeInAnAbstractBaseClass => package_name => __PACKAGE__ ); | ||||
19 | } | ||||
20 | |||||
21 | # spent 613µs (575+38) within Class::MOP::Method::Generated::_generate_description which was called 131 times, avg 5µs/call:
# 131 times (575µs+38µs) by Class::MOP::Method::Generated::_compile_code at line 56, avg 5µs/call | ||||
22 | 131 | 23µs | my ( $self, $context ) = @_; | ||
23 | 131 | 205µs | 131 | 38µs | $context ||= $self->definition_context; # spent 38µs making 131 calls to Class::MOP::Method::Generated::definition_context, avg 289ns/call |
24 | |||||
25 | 131 | 23µs | my $desc = "generated method"; | ||
26 | 131 | 11µs | my $origin = "unknown origin"; | ||
27 | |||||
28 | 131 | 30µs | if (defined $context) { | ||
29 | 131 | 49µs | if (defined $context->{description}) { | ||
30 | $desc = $context->{description}; | ||||
31 | } | ||||
32 | |||||
33 | 131 | 155µs | if (defined $context->{file} || defined $context->{line}) { | ||
34 | $origin = "defined at " | ||||
35 | . (defined $context->{file} | ||||
36 | ? $context->{file} : "<unknown file>") | ||||
37 | . " line " | ||||
38 | . (defined $context->{line} | ||||
39 | ? $context->{line} : "<unknown line>"); | ||||
40 | } | ||||
41 | } | ||||
42 | |||||
43 | 131 | 179µs | return "$desc ($origin)"; | ||
44 | } | ||||
45 | |||||
46 | # spent 25.6ms (1.04+24.5) within Class::MOP::Method::Generated::_compile_code which was called 131 times, avg 195µs/call:
# 54 times (367µs+8.97ms) by Class::MOP::Method::Accessor::try {...} at line 151 of Class/MOP/Method/Accessor.pm, avg 173µs/call
# 31 times (310µs+10.5ms) by Class::MOP::Method::Constructor::try {...} at line 107 of Class/MOP/Method/Constructor.pm, avg 349µs/call
# 21 times (158µs+1.99ms) by Class::MOP::Method::Accessor::try {...} at line 113 of Class/MOP/Method/Accessor.pm, avg 102µs/call
# 15 times (110µs+1.17ms) by Class::MOP::Method::Accessor::try {...} at line 219 of Class/MOP/Method/Accessor.pm, avg 86µs/call
# 6 times (70µs+1.57ms) by Moose::Meta::Method::Accessor::try {...} at line 34 of Moose/Meta/Method/Accessor.pm, avg 273µs/call
# 3 times (20µs+230µs) by Class::MOP::Method::Accessor::try {...} at line 191 of Class/MOP/Method/Accessor.pm, avg 83µs/call
# once (9µs+92µs) by Moose::Meta::Method::Destructor::try {...} at line 92 of Moose/Meta/Method/Destructor.pm | ||||
47 | 131 | 33µs | my ( $self, @args ) = @_; | ||
48 | 131 | 103µs | unshift @args, 'source' if @args % 2; | ||
49 | 131 | 86µs | my %args = @args; | ||
50 | |||||
51 | 131 | 40µs | my $context = delete $args{context}; | ||
52 | 131 | 324µs | 168 | 3.71ms | my $environment = $self->can('_eval_environment') # spent 3.26ms making 31 calls to Class::MOP::Method::Constructor::_eval_environment, avg 105µs/call
# spent 359µs making 6 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 60µs/call
# spent 87µs making 131 calls to UNIVERSAL::can, avg 663ns/call |
53 | ? $self->_eval_environment | ||||
54 | : {}; | ||||
55 | |||||
56 | 131 | 459µs | 262 | 20.8ms | return eval_closure( # spent 20.2ms making 131 calls to Eval::Closure::eval_closure, avg 154µs/call
# spent 613µs making 131 calls to Class::MOP::Method::Generated::_generate_description, avg 5µs/call |
57 | environment => $environment, | ||||
58 | description => $self->_generate_description($context), | ||||
59 | %args, | ||||
60 | ); | ||||
61 | } | ||||
62 | |||||
63 | 1 | 2µs | 1; | ||
64 | |||||
65 | # ABSTRACT: Abstract base class for generated methods | ||||
66 | |||||
67 | __END__ |