← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:42:38 2010
Reported on Wed Nov 17 22:05:14 2010

Filename/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm
StatementsExecuted 8318 statements in 148ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3662246.5ms870msClass::MOP::Method::Accessor::::newClass::MOP::Method::Accessor::new
3611122.1ms753msClass::MOP::Method::Accessor::::_initialize_bodyClass::MOP::Method::Accessor::_initialize_body
2252215.5ms15.5msClass::MOP::Method::Accessor::::_newClass::MOP::Method::Accessor::_new
1502210.2ms394msClass::MOP::Method::Accessor::::_generate_reader_method_inlineClass::MOP::Method::Accessor::_generate_reader_method_inline
150119.37ms364msClass::MOP::Method::Accessor::::__ANON__[:152]Class::MOP::Method::Accessor::__ANON__[:152]
43222.84ms77.6msClass::MOP::Method::Accessor::::_generate_predicate_method_inlineClass::MOP::Method::Accessor::_generate_predicate_method_inline
41222.75ms133msClass::MOP::Method::Accessor::::_generate_accessor_method_inlineClass::MOP::Method::Accessor::_generate_accessor_method_inline
41112.65ms125msClass::MOP::Method::Accessor::::__ANON__[:118]Class::MOP::Method::Accessor::__ANON__[:118]
53111.94ms2.42msClass::MOP::Method::Accessor::::_generate_reader_methodClass::MOP::Method::Accessor::_generate_reader_method
29111.93ms59.0msClass::MOP::Method::Accessor::::_generate_clearer_method_inlineClass::MOP::Method::Accessor::_generate_clearer_method_inline
43111.80ms69.2msClass::MOP::Method::Accessor::::__ANON__[:207]Class::MOP::Method::Accessor::__ANON__[:207]
29111.21ms53.4msClass::MOP::Method::Accessor::::__ANON__[:232]Class::MOP::Method::Accessor::__ANON__[:232]
1422966µs33.3msClass::MOP::Method::Accessor::::_generate_writer_method_inlineClass::MOP::Method::Accessor::_generate_writer_method_inline
5311732µs732µsClass::MOP::Method::Accessor::::_inline_throw_errorClass::MOP::Method::Accessor::_inline_throw_error
1511674µs823µsClass::MOP::Method::Accessor::::_generate_accessor_methodClass::MOP::Method::Accessor::_generate_accessor_method
1411597µs30.6msClass::MOP::Method::Accessor::::__ANON__[:182]Class::MOP::Method::Accessor::__ANON__[:182]
1311486µs608µsClass::MOP::Method::Accessor::::_generate_predicate_methodClass::MOP::Method::Accessor::_generate_predicate_method
311124µs152µsClass::MOP::Method::Accessor::::_generate_writer_methodClass::MOP::Method::Accessor::_generate_writer_method
11180µs99µsClass::MOP::Method::Accessor::::BEGIN@4Class::MOP::Method::Accessor::BEGIN@4
11148µs123µsClass::MOP::Method::Accessor::::BEGIN@5Class::MOP::Method::Accessor::BEGIN@5
11142µs30.9msClass::MOP::Method::Accessor::::BEGIN@15Class::MOP::Method::Accessor::BEGIN@15
11138µs216µsClass::MOP::Method::Accessor::::BEGIN@9Class::MOP::Method::Accessor::BEGIN@9
11138µs225µsClass::MOP::Method::Accessor::::BEGIN@8Class::MOP::Method::Accessor::BEGIN@8
11137µs195µsClass::MOP::Method::Accessor::::BEGIN@7Class::MOP::Method::Accessor::BEGIN@7
0000s0sClass::MOP::Method::Accessor::::__ANON__[:102]Class::MOP::Method::Accessor::__ANON__[:102]
0000s0sClass::MOP::Method::Accessor::::__ANON__[:121]Class::MOP::Method::Accessor::__ANON__[:121]
0000s0sClass::MOP::Method::Accessor::::__ANON__[:132]Class::MOP::Method::Accessor::__ANON__[:132]
0000s0sClass::MOP::Method::Accessor::::__ANON__[:155]Class::MOP::Method::Accessor::__ANON__[:155]
0000s0sClass::MOP::Method::Accessor::::__ANON__[:169]Class::MOP::Method::Accessor::__ANON__[:169]
0000s0sClass::MOP::Method::Accessor::::__ANON__[:185]Class::MOP::Method::Accessor::__ANON__[:185]
0000s0sClass::MOP::Method::Accessor::::__ANON__[:194]Class::MOP::Method::Accessor::__ANON__[:194]
0000s0sClass::MOP::Method::Accessor::::__ANON__[:210]Class::MOP::Method::Accessor::__ANON__[:210]
0000s0sClass::MOP::Method::Accessor::::__ANON__[:219]Class::MOP::Method::Accessor::__ANON__[:219]
0000s0sClass::MOP::Method::Accessor::::__ANON__[:235]Class::MOP::Method::Accessor::__ANON__[:235]
0000s0sClass::MOP::Method::Accessor::::_generate_clearer_methodClass::MOP::Method::Accessor::_generate_clearer_method
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1
2package Class::MOP::Method::Accessor;
3
43117µs2118µs
# spent 99µs (80+19) within Class::MOP::Method::Accessor::BEGIN@4 which was called: # once (80µs+19µs) by Class::MOP::Class::BEGIN@9 at line 4
use strict;
# spent 99µs making 1 call to Class::MOP::Method::Accessor::BEGIN@4 # spent 19µs making 1 call to strict::import
53115µs2198µs
# spent 123µs (48+75) within Class::MOP::Method::Accessor::BEGIN@5 which was called: # once (48µs+75µs) by Class::MOP::Class::BEGIN@9 at line 5
use warnings;
# spent 123µs making 1 call to Class::MOP::Method::Accessor::BEGIN@5 # spent 75µs making 1 call to warnings::import
6
73106µs2353µs
# spent 195µs (37+158) within Class::MOP::Method::Accessor::BEGIN@7 which was called: # once (37µs+158µs) by Class::MOP::Class::BEGIN@9 at line 7
use Carp 'confess';
# spent 195µs making 1 call to Class::MOP::Method::Accessor::BEGIN@7 # spent 158µs making 1 call to Exporter::import
83100µs2413µs
# spent 225µs (38+188) within Class::MOP::Method::Accessor::BEGIN@8 which was called: # once (38µs+188µs) by Class::MOP::Class::BEGIN@9 at line 8
use Scalar::Util 'blessed', 'weaken';
# spent 225µs making 1 call to Class::MOP::Method::Accessor::BEGIN@8 # spent 188µs making 1 call to Exporter::import
93248µs2393µs
# spent 216µs (38+177) within Class::MOP::Method::Accessor::BEGIN@9 which was called: # once (38µs+177µs) by Class::MOP::Class::BEGIN@9 at line 9
use Try::Tiny;
# spent 216µs making 1 call to Class::MOP::Method::Accessor::BEGIN@9 # spent 177µs making 1 call to Exporter::import
10
1115µsour $VERSION = '1.11';
12173µs$VERSION = eval $VERSION;
# spent 13µs executing statements in string eval
1314µsour $AUTHORITY = 'cpan:STEVAN';
14
1533.85ms261.8ms
# spent 30.9ms (42µs+30.9) within Class::MOP::Method::Accessor::BEGIN@15 which was called: # once (42µs+30.9ms) by Class::MOP::Class::BEGIN@9 at line 15
use base 'Class::MOP::Method::Generated';
# spent 30.9ms making 1 call to Class::MOP::Method::Accessor::BEGIN@15 # spent 30.9ms making 1 call to base::import
16
17
# spent 870ms (46.5+824) within Class::MOP::Method::Accessor::new which was called 366 times, avg 2.38ms/call: # 361 times (45.9ms+799ms) by Class::MOP::Attribute::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Attribute.pm:401] at line 393 of Class/MOP/Attribute.pm, avg 2.34ms/call # 5 times (615µs+24.6ms) by Class::MOP::Class:::around at line 31 of Moose/Meta/Method/Accessor/Native.pm, avg 5.04ms/call
sub new {
18366054.1ms my $class = shift;
19 my %options = @_;
20
21 (exists $options{attribute})
22 || confess "You must supply an attribute to construct with";
23
24 (exists $options{accessor_type})
25 || confess "You must supply an accessor_type to construct with";
26
277325.42ms (blessed($options{attribute}) && $options{attribute}->isa('Class::MOP::Attribute'))
# spent 2.90ms making 366 calls to Scalar::Util::blessed, avg 8µs/call # spent 2.52ms making 366 calls to UNIVERSAL::isa, avg 7µs/call
28 || confess "You must supply an attribute which is a 'Class::MOP::Attribute' instance";
29
30 ($options{package_name} && $options{name})
31 || confess "You must supply the package_name and name parameters $Class::MOP::Method::UPGRADE_ERROR_TEXT";
32
3336642.2ms my $self = $class->_new(\%options);
# spent 20.0ms making 191 calls to Moose::Meta::Method::Accessor::_new, avg 105µs/call # spent 8.82ms making 168 calls to Class::MOP::Method::Accessor::_new, avg 53µs/call # spent 8.64ms making 2 calls to Class::MOP::Method::_new, avg 4.32ms/call # spent 4.69ms making 5 calls to Moose::Meta::Method::Accessor::Native::_new, avg 937µs/call
34
35 # we don't want this creating
36 # a cycle in the code, if not
37 # needed
383663.26ms weaken($self->{'attribute'});
# spent 3.26ms making 366 calls to Scalar::Util::weaken, avg 9µs/call
39
40366773ms $self->_initialize_body;
# spent 753ms making 361 calls to Class::MOP::Method::Accessor::_initialize_body, avg 2.09ms/call # spent 19.8ms making 5 calls to Moose::Meta::Method::Accessor::Native::_initialize_body, avg 3.95ms/call
41
42 return $self;
43}
44
45
# spent 15.5ms within Class::MOP::Method::Accessor::_new which was called 225 times, avg 69µs/call: # 168 times (8.82ms+0s) by Class::MOP::Method::Accessor::new at line 33, avg 53µs/call # 57 times (6.64ms+0s) by Class::MOP::Method::wrap at line 44 of Class/MOP/Method.pm, avg 116µs/call
sub _new {
4690016.4ms my $class = shift;
47
48 return Class::MOP::Class->initialize($class)->new_object(@_)
49 if $class ne __PACKAGE__;
50
51 my $params = @_ == 1 ? $_[0] : {@_};
52
53 return bless {
54 # inherited from Class::MOP::Method
55 body => $params->{body},
56 associated_metaclass => $params->{associated_metaclass},
57 package_name => $params->{package_name},
58 name => $params->{name},
59 original_method => $params->{original_method},
60
61 # inherit from Class::MOP::Generated
62 is_inline => $params->{is_inline} || 0,
63 definition_context => $params->{definition_context},
64
65 # defined in this class
66 attribute => $params->{attribute},
67 accessor_type => $params->{accessor_type},
68 } => $class;
69}
70
71## accessors
72
7379011.4mssub associated_attribute { (shift)->{'attribute'} }
743615.18mssub accessor_type { (shift)->{'accessor_type'} }
75
76## factory
77
78
# spent 753ms (22.1+731) within Class::MOP::Method::Accessor::_initialize_body which was called 361 times, avg 2.09ms/call: # 361 times (22.1ms+731ms) by Class::MOP::Method::Accessor::new at line 40, avg 2.09ms/call
sub _initialize_body {
79108323.0ms my $self = shift;
80
817226.15ms my $method_name = join "_" => (
# spent 3.72ms making 361 calls to Class::MOP::Method::Accessor::accessor_type, avg 10µs/call # spent 2.43ms making 361 calls to Class::MOP::Method::Generated::is_inline, avg 7µs/call
82 '_generate',
83 $self->accessor_type,
84 'method',
85 ($self->is_inline ? 'inline' : ())
86 );
87
88361725ms $self->{'body'} = $self->$method_name();
# spent 326ms making 96 calls to Moose::Meta::Method::Accessor::_generate_reader_method, avg 3.40ms/call # spent 108ms making 26 calls to Moose::Meta::Method::Accessor::_generate_accessor_method, avg 4.16ms/call # spent 79.6ms making 54 calls to Class::MOP::Method::Accessor::_generate_reader_method_inline, avg 1.47ms/call # spent 65.7ms making 30 calls to Moose::Meta::Method::Accessor::_generate_predicate_method, avg 2.19ms/call # spent 62.7ms making 29 calls to Moose::Meta::Method::Accessor::_generate_clearer_method, avg 2.16ms/call # spent 31.0ms making 11 calls to Moose::Meta::Method::Accessor::_generate_writer_method, avg 2.82ms/call # spent 28.2ms making 15 calls to Class::MOP::Method::Accessor::_generate_accessor_method_inline, avg 1.88ms/call # spent 15.7ms making 13 calls to Class::MOP::Method::Accessor::_generate_predicate_method_inline, avg 1.21ms/call # spent 3.70ms making 3 calls to Class::MOP::Method::Accessor::_generate_writer_method_inline, avg 1.23ms/call # spent 2.42ms making 53 calls to Class::MOP::Method::Accessor::_generate_reader_method, avg 46µs/call # spent 823µs making 15 calls to Class::MOP::Method::Accessor::_generate_accessor_method, avg 55µs/call # spent 608µs making 13 calls to Class::MOP::Method::Accessor::_generate_predicate_method, avg 47µs/call # spent 152µs making 3 calls to Class::MOP::Method::Accessor::_generate_writer_method, avg 51µs/call
89}
90
91## generators
92
93
# spent 823µs (674+149) within Class::MOP::Method::Accessor::_generate_accessor_method which was called 15 times, avg 55µs/call: # 15 times (674µs+149µs) by Class::MOP::Method::Accessor::_initialize_body at line 88, avg 55µs/call
sub _generate_accessor_method {
9445644µs my $self = shift;
9515149µs my $attr = $self->associated_attribute;
# spent 149µs making 15 calls to Class::MOP::Method::Accessor::associated_attribute, avg 10µs/call
96
97 return sub {
98 if (@_ >= 2) {
99 $attr->set_value($_[0], $_[1]);
100 }
101 $attr->get_value($_[0]);
102 };
103}
104
105
# spent 133ms (2.75+130) within Class::MOP::Method::Accessor::_generate_accessor_method_inline which was called 41 times, avg 3.24ms/call: # 26 times (1.77ms+103ms) by Moose::Meta::Method::Accessor::_generate_accessor_method at line 76 of Moose/Meta/Method/Accessor.pm, avg 4.03ms/call # 15 times (980µs+27.2ms) by Class::MOP::Method::Accessor::_initialize_body at line 88, avg 1.88ms/call
sub _generate_accessor_method_inline {
1061232.34ms my $self = shift;
10741336µs my $attr = $self->associated_attribute;
# spent 336µs making 41 calls to Class::MOP::Method::Accessor::associated_attribute, avg 8µs/call
108
109
# spent 125ms (2.65+122) within Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:118] which was called 41 times, avg 3.05ms/call: # 41 times (2.65ms+122ms) by Try::Tiny::try at line 71 of Try/Tiny.pm, avg 3.05ms/call
return try {
110412.26ms123122ms $self->_compile_code([
# spent 47.4ms making 26 calls to Moose::Meta::Method::Accessor::_compile_code, avg 1.82ms/call # spent 41.5ms making 26 calls to Moose::Meta::Attribute::_inline_set_value, avg 1.60ms/call # spent 14.0ms making 15 calls to Class::MOP::Method::Generated::_compile_code, avg 932µs/call # spent 8.70ms making 26 calls to Moose::Meta::Attribute::_inline_get_value, avg 335µs/call # spent 8.42ms making 15 calls to Class::MOP::Attribute::_inline_set_value, avg 561µs/call # spent 2.21ms making 15 calls to Class::MOP::Attribute::_inline_get_value, avg 148µs/call
111 'sub {',
112 'if (@_ > 1) {',
113 $attr->_inline_set_value('$_[0]', '$_[1]'),
114 '}',
115 $attr->_inline_get_value('$_[0]'),
116 '}',
117 ]);
118 }
119 catch {
120 confess "Could not generate inline accessor because : $_";
12182694µs };
# spent 694µs making 41 calls to Try::Tiny::catch, avg 17µs/call # spent 129ms making 41 calls to Try::Tiny::try, avg 3.15ms/call, recursion: max depth 2, sum of overlapping time 129ms
122}
123
124
# spent 2.42ms (1.94+478µs) within Class::MOP::Method::Accessor::_generate_reader_method which was called 53 times, avg 46µs/call: # 53 times (1.94ms+478µs) by Class::MOP::Method::Accessor::_initialize_body at line 88, avg 46µs/call
sub _generate_reader_method {
1251591.87ms my $self = shift;
12653478µs my $attr = $self->associated_attribute;
# spent 478µs making 53 calls to Class::MOP::Method::Accessor::associated_attribute, avg 9µs/call
127
128 return sub {
12928344µs confess "Cannot assign a value to a read-only accessor"
130 if @_ > 1;
131142.52ms $attr->get_value($_[0]);
# spent 2.52ms making 14 calls to Class::MOP::Attribute::get_value, avg 180µs/call
132 };
133}
134
135
# spent 394ms (10.2+384) within Class::MOP::Method::Accessor::_generate_reader_method_inline which was called 150 times, avg 2.63ms/call: # 96 times (6.58ms+308ms) by Moose::Meta::Method::Accessor::_generate_reader_method at line 64 of Moose/Meta/Method/Accessor.pm, avg 3.27ms/call # 54 times (3.61ms+76.0ms) by Class::MOP::Method::Accessor::_initialize_body at line 88, avg 1.47ms/call
sub _generate_reader_method_inline {
1364508.55ms my $self = shift;
1371501.23ms my $attr = $self->associated_attribute;
# spent 1.23ms making 150 calls to Class::MOP::Method::Accessor::associated_attribute, avg 8µs/call
138
139
# spent 364ms (9.37+355) within Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:152] which was called 150 times, avg 2.43ms/call: # 150 times (9.37ms+355ms) by Try::Tiny::try at line 71 of Try/Tiny.pm, avg 2.43ms/call
return try {
1401507.88ms450355ms $self->_compile_code([
# spent 165ms making 97 calls to Moose::Meta::Method::Accessor::_compile_code, avg 1.71ms/call # spent 122ms making 97 calls to Moose::Meta::Attribute::_inline_get_value, avg 1.26ms/call # spent 44.2ms making 53 calls to Class::MOP::Method::Generated::_compile_code, avg 835µs/call # spent 19.5ms making 53 calls to Class::MOP::Attribute::_inline_get_value, avg 368µs/call # spent 3.00ms making 97 calls to Moose::Meta::Method::_inline_throw_error, avg 31µs/call # spent 732µs making 53 calls to Class::MOP::Method::Accessor::_inline_throw_error, avg 14µs/call
141 'sub {',
142 'if (@_ > 1) {',
143 # XXX: this is a hack, but our error stuff is terrible
144 $self->_inline_throw_error(
145 '"Cannot assign a value to a read-only accessor"',
146 'data => \@_'
147 ) . ';',
148 '}',
149 $attr->_inline_get_value('$_[0]'),
150 '}',
151 ]);
152 }
153 catch {
154 confess "Could not generate inline reader because : $_";
1553002.62ms };
# spent 2.62ms making 150 calls to Try::Tiny::catch, avg 17µs/call # spent 380ms making 150 calls to Try::Tiny::try, avg 2.53ms/call, recursion: max depth 3, sum of overlapping time 380ms
156}
157
158
# spent 732µs within Class::MOP::Method::Accessor::_inline_throw_error which was called 53 times, avg 14µs/call: # 53 times (732µs+0s) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:152] at line 140, avg 14µs/call
sub _inline_throw_error {
1591061.03ms my $self = shift;
160 return 'confess ' . $_[0];
161}
162
163
# spent 152µs (124+29) within Class::MOP::Method::Accessor::_generate_writer_method which was called 3 times, avg 51µs/call: # 3 times (124µs+29µs) by Class::MOP::Method::Accessor::_initialize_body at line 88, avg 51µs/call
sub _generate_writer_method {
1649117µs my $self = shift;
165329µs my $attr = $self->associated_attribute;
# spent 29µs making 3 calls to Class::MOP::Method::Accessor::associated_attribute, avg 10µs/call
166
167 return sub {
168 $attr->set_value($_[0], $_[1]);
169 };
170}
171
172
# spent 33.3ms (966µs+32.3) within Class::MOP::Method::Accessor::_generate_writer_method_inline which was called 14 times, avg 2.38ms/call: # 11 times (760µs+28.8ms) by Moose::Meta::Method::Accessor::_generate_writer_method at line 70 of Moose/Meta/Method/Accessor.pm, avg 2.69ms/call # 3 times (206µs+3.50ms) by Class::MOP::Method::Accessor::_initialize_body at line 88, avg 1.23ms/call
sub _generate_writer_method_inline {
17342799µs my $self = shift;
17414108µs my $attr = $self->associated_attribute;
# spent 108µs making 14 calls to Class::MOP::Method::Accessor::associated_attribute, avg 8µs/call
175
176
# spent 30.6ms (597µs+30.0) within Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:182] which was called 14 times, avg 2.18ms/call: # 14 times (597µs+30.0ms) by Try::Tiny::try at line 71 of Try/Tiny.pm, avg 2.18ms/call
return try {
17714520µs2830.0ms $self->_compile_code([
# spent 18.0ms making 11 calls to Moose::Meta::Method::Accessor::_compile_code, avg 1.64ms/call # spent 8.92ms making 11 calls to Moose::Meta::Attribute::_inline_set_value, avg 811µs/call # spent 2.58ms making 3 calls to Class::MOP::Method::Generated::_compile_code, avg 859µs/call # spent 464µs making 3 calls to Class::MOP::Attribute::_inline_set_value, avg 154µs/call
178 'sub {',
179 $attr->_inline_set_value('$_[0]', '$_[1]'),
180 '}',
181 ]);
182 }
183 catch {
184 confess "Could not generate inline writer because : $_";
18528241µs };
# spent 241µs making 14 calls to Try::Tiny::catch, avg 17µs/call # spent 32.0ms making 14 calls to Try::Tiny::try, avg 2.28ms/call, recursion: max depth 2, sum of overlapping time 32.0ms
186}
187
188
# spent 608µs (486+122) within Class::MOP::Method::Accessor::_generate_predicate_method which was called 13 times, avg 47µs/call: # 13 times (486µs+122µs) by Class::MOP::Method::Accessor::_initialize_body at line 88, avg 47µs/call
sub _generate_predicate_method {
18939460µs my $self = shift;
19013122µs my $attr = $self->associated_attribute;
# spent 122µs making 13 calls to Class::MOP::Method::Accessor::associated_attribute, avg 9µs/call
191
192 return sub {
1938174µs81.36ms $attr->has_value($_[0])
# spent 1.36ms making 8 calls to Class::MOP::Attribute::has_value, avg 170µs/call
194 };
195}
196
197
# spent 77.6ms (2.84+74.7) within Class::MOP::Method::Accessor::_generate_predicate_method_inline which was called 43 times, avg 1.80ms/call: # 30 times (2.02ms+59.9ms) by Moose::Meta::Method::Accessor::_generate_predicate_method at line 82 of Moose/Meta/Method/Accessor.pm, avg 2.06ms/call # 13 times (824µs+14.8ms) by Class::MOP::Method::Accessor::_initialize_body at line 88, avg 1.21ms/call
sub _generate_predicate_method_inline {
1981292.43ms my $self = shift;
19943353µs my $attr = $self->associated_attribute;
# spent 353µs making 43 calls to Class::MOP::Method::Accessor::associated_attribute, avg 8µs/call
200
201
# spent 69.2ms (1.80+67.4) within Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:207] which was called 43 times, avg 1.61ms/call: # 43 times (1.80ms+67.4ms) by Try::Tiny::try at line 71 of Try/Tiny.pm, avg 1.61ms/call
return try {
202431.58ms8667.4ms $self->_compile_code([
# spent 49.6ms making 30 calls to Moose::Meta::Method::Accessor::_compile_code, avg 1.65ms/call # spent 10.7ms making 13 calls to Class::MOP::Method::Generated::_compile_code, avg 825µs/call # spent 7.10ms making 43 calls to Class::MOP::Attribute::_inline_has_value, avg 165µs/call
203 'sub {',
204 $attr->_inline_has_value('$_[0]'),
205 '}',
206 ]);
207 }
208 catch {
209 confess "Could not generate inline predicate because : $_";
21086810µs };
# spent 810µs making 43 calls to Try::Tiny::catch, avg 19µs/call # spent 73.6ms making 43 calls to Try::Tiny::try, avg 1.71ms/call, recursion: max depth 2, sum of overlapping time 73.6ms
211}
212
213sub _generate_clearer_method {
214 my $self = shift;
215 my $attr = $self->associated_attribute;
216
217 return sub {
218 $attr->clear_value($_[0])
219 };
220}
221
222
# spent 59.0ms (1.93+57.1) within Class::MOP::Method::Accessor::_generate_clearer_method_inline which was called 29 times, avg 2.03ms/call: # 29 times (1.93ms+57.1ms) by Moose::Meta::Method::Accessor::_generate_clearer_method at line 88 of Moose/Meta/Method/Accessor.pm, avg 2.03ms/call
sub _generate_clearer_method_inline {
223871.62ms my $self = shift;
22429233µs my $attr = $self->associated_attribute;
# spent 233µs making 29 calls to Class::MOP::Method::Accessor::associated_attribute, avg 8µs/call
225
226
# spent 53.4ms (1.21+52.2) within Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:232] which was called 29 times, avg 1.84ms/call: # 29 times (1.21ms+52.2ms) by Try::Tiny::try at line 71 of Try/Tiny.pm, avg 1.84ms/call
return try {
227291.09ms5852.2ms $self->_compile_code([
# spent 46.8ms making 29 calls to Moose::Meta::Method::Accessor::_compile_code, avg 1.61ms/call # spent 5.39ms making 29 calls to Class::MOP::Attribute::_inline_clear_value, avg 186µs/call
228 'sub {',
229 $attr->_inline_clear_value('$_[0]'),
230 '}',
231 ]);
232 }
233 catch {
234 confess "Could not generate inline clearer because : $_";
23558506µs };
# spent 506µs making 29 calls to Try::Tiny::catch, avg 17µs/call # spent 56.3ms making 29 calls to Try::Tiny::try, avg 1.94ms/call, recursion: max depth 2, sum of overlapping time 56.3ms
236}
237
238112µs1;
239
240__END__