← 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/Moose/Meta/Method/Constructor.pm
StatementsExecuted 320 statements in 1.12ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2811685µs125msMoose::Meta::Method::Constructor::::newMoose::Meta::Method::Constructor::new
2811147µs125msMoose::Meta::Method::Constructor::::_initialize_bodyMoose::Meta::Method::Constructor::_initialize_body
1119µs18µsMoose::Meta::Method::Constructor::::BEGIN@4Moose::Meta::Method::Constructor::BEGIN@4
1117µs11µsMoose::Meta::Method::Constructor::::BEGIN@5Moose::Meta::Method::Constructor::BEGIN@5
1116µs36µsMoose::Meta::Method::Constructor::::BEGIN@7Moose::Meta::Method::Constructor::BEGIN@7
1116µs102µsMoose::Meta::Method::Constructor::::BEGIN@12Moose::Meta::Method::Constructor::BEGIN@12
1115µs33µsMoose::Meta::Method::Constructor::::BEGIN@9Moose::Meta::Method::Constructor::BEGIN@9
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Meta::Method::Constructor;
21600nsour $VERSION = '2.1604';
3
4237µs226µs
# spent 18µs (9+9) within Moose::Meta::Method::Constructor::BEGIN@4 which was called: # once (9µs+9µs) by Moose::Meta::Class::BEGIN@16 at line 4
use strict;
# spent 18µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@4 # spent 9µs making 1 call to strict::import
5220µs215µs
# spent 11µs (7+4) within Moose::Meta::Method::Constructor::BEGIN@5 which was called: # once (7µs+4µs) by Moose::Meta::Class::BEGIN@16 at line 5
use warnings;
# spent 11µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@5 # spent 4µs making 1 call to warnings::import
6
7222µs267µs
# spent 36µs (6+30) within Moose::Meta::Method::Constructor::BEGIN@7 which was called: # once (6µs+30µs) by Moose::Meta::Class::BEGIN@16 at line 7
use Scalar::Util 'weaken';
# spent 36µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@7 # spent 30µs making 1 call to Exporter::import
8
913µs128µs
# spent 33µs (5+28) within Moose::Meta::Method::Constructor::BEGIN@9 which was called: # once (5µs+28µs) by Moose::Meta::Class::BEGIN@16 at line 10
use parent 'Moose::Meta::Method',
# spent 28µs making 1 call to parent::import
10120µs133µs 'Class::MOP::Method::Constructor';
# spent 33µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@9
11
122154µs2199µs
# spent 102µs (6+97) within Moose::Meta::Method::Constructor::BEGIN@12 which was called: # once (6µs+97µs) by Moose::Meta::Class::BEGIN@16 at line 12
use Moose::Util 'throw_exception';
# spent 102µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@12 # spent 97µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337]
13
14
# spent 125ms (685µs+125) within Moose::Meta::Method::Constructor::new which was called 28 times, avg 4.48ms/call: # 28 times (685µs+125ms) by Class::MOP::Class::_inline_constructor at line 1453 of Class/MOP/Class.pm, avg 4.48ms/call
sub new {
152813µs my $class = shift;
162869µs my %options = @_;
17
182816µs my $meta = $options{metaclass};
19
202825µs (ref $options{options} eq 'HASH')
21 || throw_exception( MustPassAHashOfOptions => params => \%options,
22 class => $class
23 );
24
252817µs ($options{package_name} && $options{name})
26 || throw_exception( MustSupplyPackageNameAndName => params => \%options,
27 class => $class
28 );
29
3028150µs my $self = bless {
31 'body' => undef,
32 'package_name' => $options{package_name},
33 'name' => $options{name},
34 'options' => $options{options},
35 'associated_metaclass' => $meta,
36 'definition_context' => $options{definition_context},
37 '_expected_method_class' => $options{_expected_method_class} || 'Moose::Object',
38 } => $class;
39
40 # we don't want this creating
41 # a cycle in the code, if not
42 # needed
4328263µs2831µs weaken($self->{'associated_metaclass'});
# spent 31µs making 28 calls to Scalar::Util::weaken, avg 1µs/call
44
452845µs28125ms $self->_initialize_body;
# spent 125ms making 28 calls to Moose::Meta::Method::Constructor::_initialize_body, avg 4.45ms/call
46
4728102µs return $self;
48}
49
50## method
51
52
# spent 125ms (147µs+124) within Moose::Meta::Method::Constructor::_initialize_body which was called 28 times, avg 4.45ms/call: # 28 times (147µs+124ms) by Moose::Meta::Method::Constructor::new at line 45, avg 4.45ms/call
sub _initialize_body {
53288µs my $self = shift;
5428151µs28124ms $self->{'body'} = $self->_generate_constructor_method_inline;
# spent 124ms making 28 calls to Class::MOP::Method::Constructor::_generate_constructor_method_inline, avg 4.45ms/call
55}
56
5712µs1;
58
59# ABSTRACT: Method Meta Object for constructors
60
61__END__