← 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
StatementsExecuted 5260 statements in 18.2ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3757413.3ms196msClass::MOP::Method::Generated::::_compile_codeClass::MOP::Method::Generated::_compile_code
375113.06ms3.28msClass::MOP::Method::Generated::::_generate_descriptionClass::MOP::Method::Generated::_generate_description
111968µs1.16msClass::MOP::Method::Generated::::BEGIN@7Class::MOP::Method::Generated::BEGIN@7
1118µs18µsClass::MOP::Method::Generated::::BEGIN@4Class::MOP::Method::Generated::BEGIN@4
1116µs25µsClass::MOP::Method::Generated::::BEGIN@9Class::MOP::Method::Generated::BEGIN@9
1116µs9µsClass::MOP::Method::Generated::::BEGIN@5Class::MOP::Method::Generated::BEGIN@5
0000s0sClass::MOP::Method::Generated::::_initialize_bodyClass::MOP::Method::Generated::_initialize_body
0000s0sClass::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
1package Class::MOP::Method::Generated;
21500nsour $VERSION = '2.1604';
3
4218µs228µ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
5217µs213µ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
7285µs21.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
92195µs225µ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
13sub new {
14 $_[0]->_throw_exception( CannotCallAnAbstractBaseMethod => package_name => __PACKAGE__ );
15}
16
17sub _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 {
22375113µs my ( $self, $context ) = @_;
233751.17ms375226µs $context ||= $self->definition_context;
# spent 226µs making 375 calls to Class::MOP::Method::Generated::definition_context, avg 602ns/call
24
25375116µs my $desc = "generated method";
2637584µs my $origin = "unknown origin";
27
28375134µs if (defined $context) {
29375247µs if (defined $context->{description}) {
30 $desc = $context->{description};
31 }
32
33375775µ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
433755.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 {
47375171µs my ( $self, @args ) = @_;
48375353µs unshift @args, 'source' if @args % 2;
49375316µs my %args = @args;
50
51375210µs my $context = delete $args{context};
523751.53ms62970.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
563757.67ms750113ms 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
6312µs1;
64
65# ABSTRACT: Abstract base class for generated methods
66
67__END__