Profile of Class/MOP/Method/Generated.pm

← Index
NYTProf Performance Profile «line view»
For script/ponapi
Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:10 2016

Filename | /usr/local/lib/perl/5.18.2/Class/MOP/Method/Generated.pm
Statements | Executed 5260 statements in 18.2ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
375 | 7 | 4 | 13.3ms | 196ms | Class::MOP::Method::Generated::::_compile_codeClass::MOP::Method::Generated::_compile_code
375 | 1 | 1 | 3.06ms | 3.28ms | Class::MOP::Method::Generated::::_generate_descriptionClass::MOP::Method::Generated::_generate_description
1 | 1 | 1 | 968µs | 1.16ms | Class::MOP::Method::Generated::::BEGIN@7Class::MOP::Method::Generated::BEGIN@7
1 | 1 | 1 | 8µs | 18µs | Class::MOP::Method::Generated::::BEGIN@4Class::MOP::Method::Generated::BEGIN@4
1 | 1 | 1 | 6µs | 25µs | Class::MOP::Method::Generated::::BEGIN@9Class::MOP::Method::Generated::BEGIN@9
1 | 1 | 1 | 6µs | 9µs | Class::MOP::Method::Generated::::BEGIN@5Class::MOP::Method::Generated::BEGIN@5
0 | 0 | 0 | 0s | 0s | Class::MOP::Method::Generated::::_initialize_bodyClass::MOP::Method::Generated::_initialize_body
0 | 0 | 0 | 0s | 0s | Class::MOP::Method::Generated::::newClass::MOP::Method::Generated::new

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package Class::MOP::Method::Generated;
2 | 1 | 500ns |  |  | our $VERSION = '2.1604';
3 |  |  |  |  |
4 | 2 | 18µs | 2 | 28µs | # spent 18µs (8+10) within Class::MOP::Method::Generated::BEGIN@4 which was called: # once (8µs+10µs) by parent::import at line 4 use strict; # spent 18µs making 1 call to Class::MOP::Method::Generated::BEGIN@4 # spent 10µs making 1 call to strict::import
5 | 2 | 17µs | 2 | 13µs | # spent 9µs (6+3) within Class::MOP::Method::Generated::BEGIN@5 which was called: # once (6µs+3µs) by parent::import at line 5 use warnings; # spent 9µs making 1 call to Class::MOP::Method::Generated::BEGIN@5 # spent 4µs making 1 call to warnings::import
6 |  |  |  |  |
7 | 2 | 85µs | 2 | 1.19ms | # spent 1.16ms (968µs+196µs) within Class::MOP::Method::Generated::BEGIN@7 which was called: # once (968µs+196µs) by parent::import at line 7 use Eval::Closure; # spent 1.16ms making 1 call to Class::MOP::Method::Generated::BEGIN@7 # spent 25µs making 1 call to Exporter::import
8 |  |  |  |  |
9 | 2 | 195µs | 2 | 25µs | # spent 25µs (6+19) within Class::MOP::Method::Generated::BEGIN@9 which was called: # once (6µs+19µs) by parent::import at line 9 use parent 'Class::MOP::Method'; # spent 25µs making 1 call to Class::MOP::Method::Generated::BEGIN@9 # spent 19µs making 1 call to parent::import, recursion: max depth 1, sum of overlapping time 19µ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 3.28ms (3.06+226µs) within Class::MOP::Method::Generated::_generate_description which was called 375 times, avg 9µs/call: # 375 times (3.06ms+226µs) by Class::MOP::Method::Generated::_compile_code at line 56, avg 9µs/call sub _generate_description {
22 | 375 | 113µs |  |  | my ( $self, $context ) = @_;
23 | 375 | 1.17ms | 375 | 226µs | $context ||= $self->definition_context; # spent 226µs making 375 calls to Class::MOP::Method::Generated::definition_context, avg 602ns/call
24 |  |  |  |  |
25 | 375 | 116µs |  |  | my $desc = "generated method";
26 | 375 | 84µs |  |  | my $origin = "unknown origin";
27 |  |  |  |  |
28 | 375 | 134µs |  |  | if (defined $context) {
29 | 375 | 247µs |  |  | if (defined $context->{description}) {
30 |  |  |  |  | $desc = $context->{description};
31 |  |  |  |  | }
32 |  |  |  |  |
33 | 375 | 775µ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 | 375 | 5.03ms |  |  | return "$desc ($origin)";
44 |  |  |  |  | }
45 |  |  |  |  |
46 |  |  |  |  | # spent 196ms (13.3+183) within Class::MOP::Method::Generated::_compile_code which was called 375 times, avg 524µs/call: # 196 times (2.82ms+87.1ms) by Moose::Meta::Method::Accessor::try {...} at line 34 of Moose/Meta/Method/Accessor.pm, avg 459µs/call # 58 times (910µs+77.0ms) by Class::MOP::Method::Constructor::try {...} at line 107 of Class/MOP/Method/Constructor.pm, avg 1.34ms/call # 54 times (4.75ms+10.5ms) by Class::MOP::Method::Accessor::try {...} at line 151 of Class/MOP/Method/Accessor.pm, avg 283µs/call # 28 times (4.40ms+3.98ms) by Moose::Meta::Method::Destructor::try {...} at line 92 of Moose/Meta/Method/Destructor.pm, avg 299µs/call # 21 times (222µs+2.66ms) by Class::MOP::Method::Accessor::try {...} at line 113 of Class/MOP/Method/Accessor.pm, avg 137µs/call # 15 times (136µs+1.56ms) by Class::MOP::Method::Accessor::try {...} at line 219 of Class/MOP/Method/Accessor.pm, avg 113µs/call # 3 times (25µs+296µs) by Class::MOP::Method::Accessor::try {...} at line 191 of Class/MOP/Method/Accessor.pm, avg 107µs/call sub _compile_code {
47 | 375 | 171µs |  |  | my ( $self, @args ) = @_;
48 | 375 | 353µs |  |  | unshift @args, 'source' if @args % 2;
49 | 375 | 316µs |  |  | my %args = @args;
50 |  |  |  |  |
51 | 375 | 210µs |  |  | my $context = delete $args{context};
52 | 375 | 1.53ms | 629 | 70.0ms | my $environment = $self->can('_eval_environment') # spent 35.3ms making 58 calls to Class::MOP::Method::Constructor::_eval_environment, avg 609µs/call # spent 21.5ms making 146 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 148µs/call # spent 7.57ms making 21 calls to Moose::Meta::Class::__ANON__::SERIAL::2::_eval_environment, avg 361µs/call # spent 1.53ms making 11 calls to Moose::Meta::Class::__ANON__::SERIAL::8::_eval_environment, avg 139µs/call # spent 916µs making 4 calls to Moose::Meta::Class::__ANON__::SERIAL::10::_eval_environment, avg 229µs/call # spent 819µs making 3 calls to Moose::Meta::Class::__ANON__::SERIAL::6::_eval_environment, avg 273µs/call # spent 534µs making 3 calls to Moose::Meta::Class::__ANON__::SERIAL::5::_eval_environment, avg 178µs/call # spent 492µs making 3 calls to Moose::Meta::Class::__ANON__::SERIAL::3::_eval_environment, avg 164µs/call # spent 483µs making 3 calls to Moose::Meta::Class::__ANON__::SERIAL::4::_eval_environment, avg 161µs/call # spent 413µs making 2 calls to Moose::Meta::Class::__ANON__::SERIAL::9::_eval_environment, avg 206µs/call # spent 364µs making 375 calls to UNIVERSAL::can, avg 969ns/call
53 |  |  |  |  | ? $self->_eval_environment
54 |  |  |  |  | : {};
55 |  |  |  |  |
56 | 375 | 7.67ms | 750 | 113ms | return eval_closure( # spent 110ms making 375 calls to Eval::Closure::eval_closure, avg 293µs/call # spent 3.28ms making 375 calls to Class::MOP::Method::Generated::_generate_description, avg 9µ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__