| Filename | /home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Generated.pm |
| Statements | Executed 2794 statements in 42.8ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 296 | 7 | 4 | 26.0ms | 508ms | Class::MOP::Method::Generated::_compile_code |
| 296 | 1 | 1 | 10.1ms | 11.9ms | Class::MOP::Method::Generated::_generate_description |
| 1 | 1 | 1 | 3.52ms | 27.7ms | Class::MOP::Method::Generated::BEGIN@8 |
| 1 | 1 | 1 | 89µs | 106µs | Class::MOP::Method::Generated::BEGIN@4 |
| 1 | 1 | 1 | 46µs | 330µs | Class::MOP::Method::Generated::BEGIN@14 |
| 1 | 1 | 1 | 39µs | 117µs | Class::MOP::Method::Generated::BEGIN@5 |
| 1 | 1 | 1 | 35µs | 187µs | Class::MOP::Method::Generated::BEGIN@7 |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Method::Generated::_initialize_body |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Method::Generated::new |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | |||||
| 2 | package Class::MOP::Method::Generated; | ||||
| 3 | |||||
| 4 | 3 | 100µs | 2 | 123µs | # spent 106µs (89+17) within Class::MOP::Method::Generated::BEGIN@4 which was called:
# once (89µs+17µs) by base::import at line 4 # spent 106µs making 1 call to Class::MOP::Method::Generated::BEGIN@4
# spent 17µs making 1 call to strict::import |
| 5 | 3 | 103µs | 2 | 196µs | # spent 117µs (39+78) within Class::MOP::Method::Generated::BEGIN@5 which was called:
# once (39µs+78µs) by base::import at line 5 # spent 117µs making 1 call to Class::MOP::Method::Generated::BEGIN@5
# spent 78µs making 1 call to warnings::import |
| 6 | |||||
| 7 | 3 | 96µs | 2 | 339µs | # spent 187µs (35+152) within Class::MOP::Method::Generated::BEGIN@7 which was called:
# once (35µs+152µs) by base::import at line 7 # spent 187µs making 1 call to Class::MOP::Method::Generated::BEGIN@7
# spent 152µs making 1 call to Exporter::import |
| 8 | 3 | 736µs | 2 | 28.8ms | # spent 27.7ms (3.52+24.2) within Class::MOP::Method::Generated::BEGIN@8 which was called:
# once (3.52ms+24.2ms) by base::import at line 8 # spent 27.7ms making 1 call to Class::MOP::Method::Generated::BEGIN@8
# spent 1.13ms making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756] |
| 9 | |||||
| 10 | 1 | 5µs | our $VERSION = '1.11'; | ||
| 11 | 1 | 58µs | $VERSION = eval $VERSION; # spent 12µs executing statements in string eval | ||
| 12 | 1 | 4µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 13 | |||||
| 14 | 3 | 940µs | 2 | 330µs | # spent 330µs (46+284) within Class::MOP::Method::Generated::BEGIN@14 which was called:
# once (46µs+284µs) by base::import at line 14 # spent 330µs making 1 call to Class::MOP::Method::Generated::BEGIN@14
# spent 284µs making 1 call to base::import, recursion: max depth 2, sum of overlapping time 284µs |
| 15 | |||||
| 16 | ## accessors | ||||
| 17 | |||||
| 18 | sub new { | ||||
| 19 | confess __PACKAGE__ . " is an abstract base class, you must provide a constructor."; | ||||
| 20 | } | ||||
| 21 | |||||
| 22 | sub _initialize_body { | ||||
| 23 | confess "No body to initialize, " . __PACKAGE__ . " is an abstract base class"; | ||||
| 24 | } | ||||
| 25 | |||||
| 26 | # spent 11.9ms (10.1+1.78) within Class::MOP::Method::Generated::_generate_description which was called 296 times, avg 40µs/call:
# 296 times (10.1ms+1.78ms) by Class::MOP::Method::Generated::_compile_code at line 51, avg 40µs/call | ||||
| 27 | 985 | 12.0ms | my ( $self, $context ) = @_; | ||
| 28 | 296 | 1.78ms | $context ||= $self->definition_context; # spent 1.78ms making 296 calls to Class::MOP::Method::Generated::definition_context, avg 6µs/call | ||
| 29 | |||||
| 30 | return "generated method (unknown origin)" | ||||
| 31 | unless defined $context; | ||||
| 32 | |||||
| 33 | 14 | 264µs | if (defined $context->{description}) { | ||
| 34 | return "$context->{description} " | ||||
| 35 | . "(defined at $context->{file} line $context->{line})"; | ||||
| 36 | } else { | ||||
| 37 | return "$context->{file} (line $context->{line})"; | ||||
| 38 | } | ||||
| 39 | } | ||||
| 40 | |||||
| 41 | # spent 508ms (26.0+482) within Class::MOP::Method::Generated::_compile_code which was called 296 times, avg 1.72ms/call:
# 100 times (9.83ms+149ms) by Moose::Meta::Method::Accessor::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Meta/Method/Accessor.pm:28] at line 27 of Moose/Meta/Method/Accessor.pm, avg 1.58ms/call
# 73 times (6.96ms+234ms) by Class::MOP::Method::Constructor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Constructor.pm:122] at line 121 of Class/MOP/Method/Constructor.pm, avg 3.30ms/call
# 53 times (3.90ms+40.3ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:152] at line 140 of Class/MOP/Method/Accessor.pm, avg 835µs/call
# 39 times (2.99ms+33.6ms) by Moose::Meta::Method::Destructor::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Meta/Method/Destructor.pm:94] at line 93 of Moose/Meta/Method/Destructor.pm, avg 937µs/call
# 15 times (1.14ms+12.5ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:118] at line 110 of Class/MOP/Method/Accessor.pm, avg 907µs/call
# 13 times (986µs+10.2ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:207] at line 202 of Class/MOP/Method/Accessor.pm, avg 858µs/call
# 3 times (220µs+2.35ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:182] at line 177 of Class/MOP/Method/Accessor.pm, avg 856µs/call | ||||
| 42 | 1776 | 28.5ms | my ( $self, @args ) = @_; | ||
| 43 | unshift @args, 'source' if @args % 2; | ||||
| 44 | my %args = @args; | ||||
| 45 | |||||
| 46 | my $context = delete $args{context}; | ||||
| 47 | 469 | 118ms | my $environment = $self->can('_eval_environment') # spent 44.8ms making 42 calls to Moose::Meta::Method::Constructor::_eval_environment, avg 1.07ms/call
# spent 40.7ms making 31 calls to Class::MOP::Method::Constructor::_eval_environment, avg 1.31ms/call
# spent 20.5ms making 86 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 238µs/call
# spent 2.35ms making 296 calls to UNIVERSAL::can, avg 8µs/call
# spent 2.34ms making 2 calls to Class::MOP::Class::__ANON__::SERIAL::7::_eval_environment, avg 1.17ms/call
# spent 1.17ms making 2 calls to Class::MOP::Class::__ANON__::SERIAL::6::_eval_environment, avg 586µs/call
# spent 1.13ms making 1 call to Class::MOP::Class::__ANON__::SERIAL::17::_eval_environment
# spent 1.13ms making 1 call to Class::MOP::Class::__ANON__::SERIAL::18::_eval_environment
# spent 614µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::16::_eval_environment
# spent 551µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::12::_eval_environment
# spent 550µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::20::_eval_environment
# spent 543µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::10::_eval_environment
# spent 529µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::13::_eval_environment
# spent 520µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::22::_eval_environment
# spent 511µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::21::_eval_environment
# spent 510µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::9::_eval_environment | ||
| 48 | ? $self->_eval_environment | ||||
| 49 | : {}; | ||||
| 50 | |||||
| 51 | 592 | 363ms | return eval_closure( # spent 351ms making 296 calls to Eval::Closure::eval_closure, avg 1.19ms/call
# spent 11.9ms making 296 calls to Class::MOP::Method::Generated::_generate_description, avg 40µs/call | ||
| 52 | environment => $environment, | ||||
| 53 | description => $self->_generate_description($context), | ||||
| 54 | %args, | ||||
| 55 | ); | ||||
| 56 | } | ||||
| 57 | |||||
| 58 | 1 | 12µs | 1; | ||
| 59 | |||||
| 60 | __END__ |