← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 22:00:36 2010
Reported on Wed Nov 17 22:10:05 2010

Filename/home/doy/coding/src/Moose/blib/lib//Moose/Meta/Method/Accessor.pm
StatementsExecuted 1284 statements in 33.4ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
100228.93ms24.3msMoose::Meta::Method::Accessor::::_eval_environmentMoose::Meta::Method::Accessor::_eval_environment
123527.33ms11.2msMoose::Meta::Method::Accessor::::_instance_is_inlinableMoose::Meta::Method::Accessor::_instance_is_inlinable
100525.90ms180msMoose::Meta::Method::Accessor::::_compile_codeMoose::Meta::Method::Accessor::_compile_code
100113.81ms162msMoose::Meta::Method::Accessor::::__ANON__[:28]Moose::Meta::Method::Accessor::__ANON__[:28]
61112.29ms214msMoose::Meta::Method::Accessor::::_generate_reader_methodMoose::Meta::Method::Accessor::_generate_reader_method
1422473µs1.24msMoose::Meta::Method::Accessor::::_inline_check_lazyMoose::Meta::Method::Accessor::_inline_check_lazy
1111450µs50.0msMoose::Meta::Method::Accessor::::_generate_accessor_methodMoose::Meta::Method::Accessor::_generate_accessor_method
1411433µs2.40msMoose::Meta::Method::Accessor::::_get_valueMoose::Meta::Method::Accessor::_get_value
1011385µs867µsMoose::Meta::Method::Accessor::::_inline_triggerMoose::Meta::Method::Accessor::_inline_trigger
711301µs15.3msMoose::Meta::Method::Accessor::::_generate_predicate_methodMoose::Meta::Method::Accessor::_generate_predicate_method
821269µs625µsMoose::Meta::Method::Accessor::::_writer_value_needs_copyMoose::Meta::Method::Accessor::_writer_value_needs_copy
611257µs18.1msMoose::Meta::Method::Accessor::::_generate_writer_methodMoose::Meta::Method::Accessor::_generate_writer_method
611249µs605µsMoose::Meta::Method::Accessor::::_inline_get_old_value_for_triggerMoose::Meta::Method::Accessor::_inline_get_old_value_for_trigger
111144µs447µsMoose::Meta::Method::Accessor::::BEGIN@7Moose::Meta::Method::Accessor::BEGIN@7
11167µs84µsMoose::Meta::Method::Accessor::::BEGIN@4Moose::Meta::Method::Accessor::BEGIN@4
11164µs737µsMoose::Meta::Method::Accessor::::BEGIN@13Moose::Meta::Method::Accessor::BEGIN@13
11155µs149µsMoose::Meta::Method::Accessor::::BEGIN@5Moose::Meta::Method::Accessor::BEGIN@5
0000s0sMoose::Meta::Method::Accessor::::__ANON__[:36]Moose::Meta::Method::Accessor::__ANON__[:36]
0000s0sMoose::Meta::Method::Accessor::::_error_throwerMoose::Meta::Method::Accessor::_error_thrower
0000s0sMoose::Meta::Method::Accessor::::_generate_clearer_methodMoose::Meta::Method::Accessor::_generate_clearer_method
0000s0sMoose::Meta::Method::Accessor::::_has_valueMoose::Meta::Method::Accessor::_has_value
0000s0sMoose::Meta::Method::Accessor::::_inline_check_constraintMoose::Meta::Method::Accessor::_inline_check_constraint
0000s0sMoose::Meta::Method::Accessor::::_inline_store_valueMoose::Meta::Method::Accessor::_inline_store_value
0000s0sMoose::Meta::Method::Accessor::::_inline_tc_codeMoose::Meta::Method::Accessor::_inline_tc_code
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1
2package Moose::Meta::Method::Accessor;
3
43119µs2101µs
# spent 84µs (67+17) within Moose::Meta::Method::Accessor::BEGIN@4 which was called: # once (67µs+17µs) by Moose::Meta::Attribute::BEGIN@17 at line 4
use strict;
# spent 84µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@4 # spent 17µs making 1 call to strict::import
53161µs2244µs
# spent 149µs (55+95) within Moose::Meta::Method::Accessor::BEGIN@5 which was called: # once (55µs+95µs) by Moose::Meta::Attribute::BEGIN@17 at line 5
use warnings;
# spent 149µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@5 # spent 95µs making 1 call to warnings::import
6
73452µs2750µs
# spent 447µs (144+303) within Moose::Meta::Method::Accessor::BEGIN@7 which was called: # once (144µs+303µs) by Moose::Meta::Attribute::BEGIN@17 at line 7
use Try::Tiny;
# spent 447µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@7 # spent 303µs making 1 call to Exporter::import
8
915µsour $VERSION = '1.19';
10162µs$VERSION = eval $VERSION;
# spent 12µs executing statements in string eval
1114µsour $AUTHORITY = 'cpan:STEVAN';
12
131673µs
# spent 737µs (64+673) within Moose::Meta::Method::Accessor::BEGIN@13 which was called: # once (64µs+673µs) by Moose::Meta::Attribute::BEGIN@17 at line 14
use base 'Moose::Meta::Method',
# spent 673µs making 1 call to base::import
1432.31ms1737µs 'Class::MOP::Method::Accessor';
# spent 737µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@13
15
16sub _error_thrower {
17 my $self = shift;
18 return $self->associated_attribute
19 if ref($self) && defined($self->associated_attribute);
20 return $self->SUPER::_error_thrower;
21}
22
23
# spent 180ms (5.90+174) within Moose::Meta::Method::Accessor::_compile_code which was called 100 times, avg 1.80ms/call: # 62 times (3.64ms+103ms) 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 1.72ms/call # 14 times (802µs+33.8ms) by Moose::Meta::Method::Accessor::Native::_initialize_body at line 46 of Moose/Meta/Method/Accessor/Native.pm, avg 2.47ms/call # 11 times (698µs+14.7ms) 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 1.40ms/call # 7 times (410µs+11.3ms) 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 1.67ms/call # 6 times (347µs+10.6ms) 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 1.83ms/call
sub _compile_code {
243005.64ms my $self = shift;
25 my @args = @_;
26
# spent 162ms (3.81+158) within Moose::Meta::Method::Accessor::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Meta/Method/Accessor.pm:28] which was called 100 times, avg 1.62ms/call: # 100 times (3.81ms+158ms) by Try::Tiny::try at line 71 of Try/Tiny.pm, avg 1.62ms/call
try {
271003.85ms100158ms $self->SUPER::_compile_code(@args);
# spent 158ms making 100 calls to Class::MOP::Method::Generated::_compile_code, avg 1.58ms/call
28 }
29 catch {
30 $self->throw_error(
31 'Could not create writer for '
32 . "'" . $self->associated_attribute->name . "' "
33 . 'because ' . $_,
34 error => $_,
35 );
362001.92ms };
# spent 1.92ms making 100 calls to Try::Tiny::catch, avg 19µs/call # spent 172ms making 100 calls to Try::Tiny::try, avg 1.72ms/call, recursion: max depth 4, sum of overlapping time 172ms
37}
38
39
# spent 24.3ms (8.93+15.4) within Moose::Meta::Method::Accessor::_eval_environment which was called 100 times, avg 243µs/call: # 86 times (7.66ms+12.8ms) by Class::MOP::Method::Generated::_compile_code at line 47 of Class/MOP/Method/Generated.pm, avg 238µs/call # 14 times (1.27ms+2.57ms) by Moose::Role::super at line 71 of Moose/Role.pm, avg 274µs/call
sub _eval_environment {
404006.40ms my $self = shift;
41
421001.05ms my $attr = $self->associated_attribute;
# spent 1.05ms making 100 calls to Class::MOP::Method::Accessor::associated_attribute, avg 11µs/call
431001.84ms my $type_constraint_obj = $attr->type_constraint;
# spent 1.84ms making 100 calls to Moose::Meta::Mixin::AttributeCore::type_constraint, avg 18µs/call
44
45 return {
4611.40ms19612.5ms '$attr' => \$attr,
# spent 11.1ms making 73 calls to MooseX::Types::TypeDecorator::AUTOLOAD, avg 152µs/call # spent 736µs making 73 calls to MooseX::Types::TypeDecorator::__ANON__[MooseX/Types/TypeDecorator.pm:27], avg 10µs/call # spent 351µs making 25 calls to Moose::Meta::TypeConstraint::_compiled_type_constraint, avg 14µs/call # spent 279µs making 25 calls to Moose::Meta::TypeConstraint::__ANON__[Moose/Meta/TypeConstraint.pm:10], avg 11µs/call
47 '$meta' => \$self,
48 '$type_constraint_obj' => \$type_constraint_obj,
49 '$type_constraint' => \(
50 $type_constraint_obj
51 ? $type_constraint_obj->_compiled_type_constraint
52 : undef
53 ),
54 };
55}
56
57
# spent 11.2ms (7.33+3.82) within Moose::Meta::Method::Accessor::_instance_is_inlinable which was called 123 times, avg 91µs/call: # 61 times (3.53ms+1.93ms) by Moose::Meta::Method::Accessor::_generate_reader_method at line 64, avg 90µs/call # 38 times (2.40ms+1.17ms) by Moose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined at line 150 of Moose/Meta/Method/Accessor/Native.pm, avg 94µs/call # 11 times (687µs+335µs) by Moose::Meta::Method::Accessor::_generate_accessor_method at line 76, avg 93µs/call # 7 times (383µs+208µs) by Moose::Meta::Method::Accessor::_generate_predicate_method at line 82, avg 84µs/call # 6 times (331µs+181µs) by Moose::Meta::Method::Accessor::_generate_writer_method at line 70, avg 85µs/call
sub _instance_is_inlinable {
582468.37ms my $self = shift;
594923.82ms return $self->associated_attribute->associated_class->instance_metaclass->is_inlinable;
# spent 1.19ms making 123 calls to Class::MOP::Instance::is_inlinable, avg 10µs/call # spent 1.14ms making 123 calls to Class::MOP::Method::Accessor::associated_attribute, avg 9µs/call # spent 757µs making 123 calls to Class::MOP::Class::instance_metaclass, avg 6µs/call # spent 736µs making 123 calls to Class::MOP::Attribute::associated_class, avg 6µs/call
60}
61
62
# spent 214ms (2.29+212) within Moose::Meta::Method::Accessor::_generate_reader_method which was called 61 times, avg 3.51ms/call: # 61 times (2.29ms+212ms) by Class::MOP::Method::Accessor::_initialize_body at line 88 of Class/MOP/Method/Accessor.pm, avg 3.51ms/call
sub _generate_reader_method {
631222.03ms my $self = shift;
64122212ms $self->_instance_is_inlinable ? $self->_generate_reader_method_inline(@_)
# spent 206ms making 61 calls to Class::MOP::Method::Accessor::_generate_reader_method_inline, avg 3.38ms/call # spent 5.46ms making 61 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 90µs/call
65 : $self->SUPER::_generate_reader_method(@_);
66}
67
68
# spent 18.1ms (257µs+17.9) within Moose::Meta::Method::Accessor::_generate_writer_method which was called 6 times, avg 3.02ms/call: # 6 times (257µs+17.9ms) by Class::MOP::Method::Accessor::_initialize_body at line 88 of Class/MOP/Method/Accessor.pm, avg 3.02ms/call
sub _generate_writer_method {
6912222µs my $self = shift;
701217.9ms $self->_instance_is_inlinable ? $self->_generate_writer_method_inline(@_)
# spent 17.4ms making 6 calls to Class::MOP::Method::Accessor::_generate_writer_method_inline, avg 2.89ms/call # spent 513µs making 6 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 85µs/call
71 : $self->SUPER::_generate_writer_method(@_);
72}
73
74
# spent 50.0ms (450µs+49.5) within Moose::Meta::Method::Accessor::_generate_accessor_method which was called 11 times, avg 4.55ms/call: # 11 times (450µs+49.5ms) by Class::MOP::Method::Accessor::_initialize_body at line 88 of Class/MOP/Method/Accessor.pm, avg 4.55ms/call
sub _generate_accessor_method {
7522468µs my $self = shift;
762249.5ms $self->_instance_is_inlinable ? $self->_generate_accessor_method_inline(@_)
# spent 48.5ms making 11 calls to Class::MOP::Method::Accessor::_generate_accessor_method_inline, avg 4.41ms/call # spent 1.02ms making 11 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 93µs/call
77 : $self->SUPER::_generate_accessor_method(@_);
78}
79
80
# spent 15.3ms (301µs+15.0) within Moose::Meta::Method::Accessor::_generate_predicate_method which was called 7 times, avg 2.19ms/call: # 7 times (301µs+15.0ms) by Class::MOP::Method::Accessor::_initialize_body at line 88 of Class/MOP/Method/Accessor.pm, avg 2.19ms/call
sub _generate_predicate_method {
8114264µs my $self = shift;
821415.0ms $self->_instance_is_inlinable ? $self->_generate_predicate_method_inline(@_)
# spent 14.4ms making 7 calls to Class::MOP::Method::Accessor::_generate_predicate_method_inline, avg 2.06ms/call # spent 591µs making 7 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 84µs/call
83 : $self->SUPER::_generate_predicate_method(@_);
84}
85
86sub _generate_clearer_method {
87 my $self = shift;
88 $self->_instance_is_inlinable ? $self->_generate_clearer_method_inline(@_)
89 : $self->SUPER::_generate_clearer_method(@_);
90}
91
92
# spent 625µs (269+356) within Moose::Meta::Method::Accessor::_writer_value_needs_copy which was called 8 times, avg 78µs/call: # 4 times (148µs+181µs) by Moose::Meta::Method::Accessor::Native::Writer::_inline_copy_native_value at line 104 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 82µs/call # 4 times (121µs+175µs) by Moose::Meta::Method::Accessor::Native::Writer::_inline_set_new_value at line 150 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 74µs/call
sub _writer_value_needs_copy {
938249µs16356µs shift->associated_attribute->_writer_value_needs_copy(@_);
# spent 293µs making 8 calls to Moose::Meta::Attribute::_writer_value_needs_copy, avg 37µs/call # spent 63µs making 8 calls to Class::MOP::Method::Accessor::associated_attribute, avg 8µs/call
94}
95
96sub _inline_tc_code {
97 shift->associated_attribute->_inline_tc_code(@_);
98}
99
100sub _inline_check_constraint {
101 shift->associated_attribute->_inline_check_constraint(@_);
102}
103
104
# spent 1.24ms (473µs+764µs) within Moose::Meta::Method::Accessor::_inline_check_lazy which was called 14 times, avg 88µs/call: # 10 times (327µs+543µs) by Moose::Meta::Method::Accessor::Native::Writer::_inline_writer_core at line 41 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 87µs/call # 4 times (146µs+221µs) by Moose::Meta::Method::Accessor::Native::Reader::_inline_reader_core at line 36 of Moose/Meta/Method/Accessor/Native/Reader.pm, avg 92µs/call
sub _inline_check_lazy {
10514430µs28764µs shift->associated_attribute->_inline_check_lazy(@_);
# spent 637µs making 14 calls to Moose::Meta::Attribute::_inline_check_lazy, avg 46µs/call # spent 127µs making 14 calls to Class::MOP::Method::Accessor::associated_attribute, avg 9µs/call
106}
107
108sub _inline_store_value {
109 shift->associated_attribute->_inline_instance_set(@_) . ';';
110}
111
112
# spent 605µs (249+356) within Moose::Meta::Method::Accessor::_inline_get_old_value_for_trigger which was called 6 times, avg 101µs/call: # 6 times (249µs+356µs) by Moose::Meta::Method::Accessor::Native::Writer::_inline_writer_core at line 54 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 101µs/call
sub _inline_get_old_value_for_trigger {
1136217µs12356µs shift->associated_attribute->_inline_get_old_value_for_trigger(@_);
# spent 304µs making 6 calls to Moose::Meta::Attribute::_inline_get_old_value_for_trigger, avg 51µs/call # spent 52µs making 6 calls to Class::MOP::Method::Accessor::associated_attribute, avg 9µs/call
114}
115
116
# spent 867µs (385+482) within Moose::Meta::Method::Accessor::_inline_trigger which was called 10 times, avg 87µs/call: # 10 times (385µs+482µs) by Moose::Meta::Method::Accessor::Native::Writer::_inline_writer_core at line 54 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 87µs/call
sub _inline_trigger {
11710323µs20482µs shift->associated_attribute->_inline_trigger(@_);
# spent 401µs making 10 calls to Moose::Meta::Attribute::_inline_trigger, avg 40µs/call # spent 81µs making 10 calls to Class::MOP::Method::Accessor::associated_attribute, avg 8µs/call
118}
119
120
# spent 2.40ms (433µs+1.97) within Moose::Meta::Method::Accessor::_get_value which was called 14 times, avg 172µs/call: # 14 times (433µs+1.97ms) by Moose::Role::super at line 71 of Moose/Role.pm, avg 172µs/call
sub _get_value {
12114381µs281.97ms shift->associated_attribute->_inline_instance_get(@_);
# spent 1.86ms making 14 calls to Class::MOP::Attribute::_inline_instance_get, avg 133µs/call # spent 114µs making 14 calls to Class::MOP::Method::Accessor::associated_attribute, avg 8µs/call
122}
123
124sub _has_value {
125 shift->associated_attribute->_inline_instance_has(@_);
126}
127
128111µs1;
129
130__END__