← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 10:04:38 2014
Reported on Tue Jun 24 10:05:31 2014

Filename/usr/local/lib/perl/5.14.2/Moose/Meta/Method/Accessor.pm
StatementsExecuted 836 statements in 3.08ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
6441619µs22.8msMoose::Meta::Method::Accessor::::_compile_codeMoose::Meta::Method::Accessor::_compile_code
6341501µs692µsMoose::Meta::Method::Accessor::::_instance_is_inlinableMoose::Meta::Method::Accessor::_instance_is_inlinable
6411304µs4.30msMoose::Meta::Method::Accessor::::_eval_environmentMoose::Meta::Method::Accessor::_eval_environment
3011150µs216µsMoose::Meta::Method::Accessor::::_error_throwerMoose::Meta::Method::Accessor::_error_thrower
2911149µs21.0msMoose::Meta::Method::Accessor::::_generate_reader_methodMoose::Meta::Method::Accessor::_generate_reader_method
3011146µs26.8msMoose::Meta::Method::Accessor::::_generate_accessor_methodMoose::Meta::Method::Accessor::_generate_accessor_method
6411118µs118µsMoose::Meta::Method::Accessor::::newMoose::Meta::Method::Accessor::new
641169µs69µsMoose::Meta::Method::Accessor::::_newMoose::Meta::Method::Accessor::_new
21126µs722µsMoose::Meta::Method::Accessor::::_generate_predicate_methodMoose::Meta::Method::Accessor::_generate_predicate_method
21122µs806µsMoose::Meta::Method::Accessor::::_generate_clearer_methodMoose::Meta::Method::Accessor::_generate_clearer_method
11110µs10µsMoose::Meta::Method::Accessor::::BEGIN@3Moose::Meta::Method::Accessor::BEGIN@3
1118µs11µsMoose::Meta::Method::Accessor::::BEGIN@10Moose::Meta::Method::Accessor::BEGIN@10
1118µs13µsMoose::Meta::Method::Accessor::::BEGIN@11Moose::Meta::Method::Accessor::BEGIN@11
1117µs74µsMoose::Meta::Method::Accessor::::BEGIN@15Moose::Meta::Method::Accessor::BEGIN@15
1117µs39µsMoose::Meta::Method::Accessor::::BEGIN@13Moose::Meta::Method::Accessor::BEGIN@13
0000s0sMoose::Meta::Method::Accessor::::__ANON__[:39]Moose::Meta::Method::Accessor::__ANON__[:39]
0000s0sMoose::Meta::Method::Accessor::::__ANON__[:47]Moose::Meta::Method::Accessor::__ANON__[:47]
0000s0sMoose::Meta::Method::Accessor::::_generate_writer_methodMoose::Meta::Method::Accessor::_generate_writer_method
0000s0sMoose::Meta::Method::Accessor::::_get_valueMoose::Meta::Method::Accessor::_get_value
0000s0sMoose::Meta::Method::Accessor::::_has_valueMoose::Meta::Method::Accessor::_has_value
0000s0sMoose::Meta::Method::Accessor::::_inline_check_coercionMoose::Meta::Method::Accessor::_inline_check_coercion
0000s0sMoose::Meta::Method::Accessor::::_inline_check_constraintMoose::Meta::Method::Accessor::_inline_check_constraint
0000s0sMoose::Meta::Method::Accessor::::_inline_check_lazyMoose::Meta::Method::Accessor::_inline_check_lazy
0000s0sMoose::Meta::Method::Accessor::::_inline_get_old_value_for_triggerMoose::Meta::Method::Accessor::_inline_get_old_value_for_trigger
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
0000s0sMoose::Meta::Method::Accessor::::_inline_triggerMoose::Meta::Method::Accessor::_inline_trigger
0000s0sMoose::Meta::Method::Accessor::::_writer_value_needs_copyMoose::Meta::Method::Accessor::_writer_value_needs_copy
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
# spent 10µs within Moose::Meta::Method::Accessor::BEGIN@3 which was called: # once (10µs+0s) by Moose::Meta::Attribute::BEGIN@21 at line 5
BEGIN {
415µs $Moose::Meta::Method::Accessor::AUTHORITY = 'cpan:STEVAN';
5130µs110µs}
# spent 10µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@3
6{
721µs $Moose::Meta::Method::Accessor::VERSION = '2.1005';
8}
9
10228µs214µs
# spent 11µs (8+3) within Moose::Meta::Method::Accessor::BEGIN@10 which was called: # once (8µs+3µs) by Moose::Meta::Attribute::BEGIN@21 at line 10
use strict;
# spent 11µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@10 # spent 3µs making 1 call to strict::import
11221µs218µs
# spent 13µs (8+5) within Moose::Meta::Method::Accessor::BEGIN@11 which was called: # once (8µs+5µs) by Moose::Meta::Attribute::BEGIN@21 at line 11
use warnings;
# spent 13µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@11 # spent 5µs making 1 call to warnings::import
12
13227µs271µs
# spent 39µs (7+32) within Moose::Meta::Method::Accessor::BEGIN@13 which was called: # once (7µs+32µs) by Moose::Meta::Attribute::BEGIN@21 at line 13
use Try::Tiny;
# spent 39µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@13 # spent 32µs making 1 call to Exporter::import
14
1514µs167µs
# spent 74µs (7+67) within Moose::Meta::Method::Accessor::BEGIN@15 which was called: # once (7µs+67µs) by Moose::Meta::Attribute::BEGIN@21 at line 16
use base 'Moose::Meta::Method',
# spent 67µs making 1 call to base::import
161532µs174µs 'Class::MOP::Method::Accessor';
# spent 74µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@15
17
18# multiple inheritance is terrible
19
# spent 118µs within Moose::Meta::Method::Accessor::new which was called 64 times, avg 2µs/call: # 64 times (118µs+0s) by Class::MOP::Attribute::try {...} at line 389 of Class/MOP/Attribute.pm, avg 2µs/call
sub new {
2064218µs6464.6ms goto &Class::MOP::Method::Accessor::new;
# spent 64.6ms making 64 calls to Class::MOP::Method::Accessor::new, avg 1.01ms/call
21}
22
23
# spent 69µs within Moose::Meta::Method::Accessor::_new which was called 64 times, avg 1µs/call: # 64 times (69µs+0s) by Class::MOP::Method::Accessor::new at line 35 of Class/MOP/Method/Accessor.pm, avg 1µs/call
sub _new {
2464183µs6412.4ms goto &Class::MOP::Method::Accessor::_new;
# spent 12.4ms making 64 calls to Class::MOP::Method::Accessor::_new, avg 193µs/call
25}
26
27
# spent 216µs (150+67) within Moose::Meta::Method::Accessor::_error_thrower which was called 30 times, avg 7µs/call: # 30 times (150µs+67µs) by Moose::Meta::Method::_inline_throw_error at line 37 of Moose/Meta/Method.pm, avg 7µs/call
sub _error_thrower {
28307µs my $self = shift;
2930106µs6067µs return $self->associated_attribute
# spent 67µs making 60 calls to Class::MOP::Method::Accessor::associated_attribute, avg 1µs/call
30 if ref($self) && defined($self->associated_attribute);
31 return $self->SUPER::_error_thrower;
32}
33
34
# spent 22.8ms (619µs+22.2) within Moose::Meta::Method::Accessor::_compile_code which was called 64 times, avg 357µs/call: # 30 times (292µs+11.3ms) by Class::MOP::Method::Accessor::try {...} at line 112 of Class/MOP/Method/Accessor.pm, avg 386µs/call # 30 times (293µs+9.82ms) by Class::MOP::Method::Accessor::try {...} at line 142 of Class/MOP/Method/Accessor.pm, avg 337µs/call # 2 times (18µs+575µs) by Class::MOP::Method::Accessor::try {...} at line 229 of Class/MOP/Method/Accessor.pm, avg 296µs/call # 2 times (17µs+522µs) by Class::MOP::Method::Accessor::try {...} at line 204 of Class/MOP/Method/Accessor.pm, avg 270µs/call
sub _compile_code {
356419µs my $self = shift;
366446µs my @args = @_;
37 try {
3864321µs6420.3ms $self->SUPER::_compile_code(@args);
# spent 20.3ms making 64 calls to Class::MOP::Method::Generated::_compile_code, avg 318µs/call
39 }
40 catch {
41 $self->throw_error(
42 'Could not create writer for '
43 . "'" . $self->associated_attribute->name . "' "
44 . 'because ' . $_,
45 error => $_,
46 );
4764486µs128182µs };
# spent 182µs making 64 calls to Try::Tiny::catch, avg 3µs/call # spent 22.0ms making 64 calls to Try::Tiny::try, avg 344µs/call, recursion: max depth 3, sum of overlapping time 22.0ms
48}
49
50
# spent 4.30ms (304µs+4.00) within Moose::Meta::Method::Accessor::_eval_environment which was called 64 times, avg 67µs/call: # 64 times (304µs+4.00ms) by Class::MOP::Method::Generated::_compile_code at line 59 of Class/MOP/Method/Generated.pm, avg 67µs/call
sub _eval_environment {
516416µs my $self = shift;
5264215µs1284.00ms return $self->associated_attribute->_eval_environment;
# spent 3.91ms making 64 calls to Moose::Meta::Attribute::_eval_environment, avg 61µs/call # spent 84µs making 64 calls to Class::MOP::Method::Accessor::associated_attribute, avg 1µs/call
53}
54
55
# spent 692µs (501+192) within Moose::Meta::Method::Accessor::_instance_is_inlinable which was called 63 times, avg 11µs/call: # 30 times (237µs+90µs) by Moose::Meta::Method::Accessor::_generate_accessor_method at line 74, avg 11µs/call # 29 times (233µs+90µs) by Moose::Meta::Method::Accessor::_generate_reader_method at line 62, avg 11µs/call # 2 times (16µs+6µs) by Moose::Meta::Method::Accessor::_generate_clearer_method at line 86, avg 11µs/call # 2 times (15µs+6µs) by Moose::Meta::Method::Accessor::_generate_predicate_method at line 80, avg 11µs/call
sub _instance_is_inlinable {
56639µs my $self = shift;
5763524µs252192µs return $self->associated_attribute->associated_class->instance_metaclass->is_inlinable;
# spent 60µs making 63 calls to Class::MOP::Method::Accessor::associated_attribute, avg 948ns/call # spent 49µs making 63 calls to Class::MOP::Instance::is_inlinable, avg 779ns/call # spent 42µs making 63 calls to Class::MOP::Class::instance_metaclass, avg 660ns/call # spent 41µs making 63 calls to Class::MOP::Attribute::associated_class, avg 657ns/call
58}
59
60
# spent 21.0ms (149µs+20.8) within Moose::Meta::Method::Accessor::_generate_reader_method which was called 29 times, avg 724µs/call: # 29 times (149µs+20.8ms) by Class::MOP::Method::Accessor::_initialize_body at line 90 of Class/MOP/Method/Accessor.pm, avg 724µs/call
sub _generate_reader_method {
61296µs my $self = shift;
6229113µs5820.8ms $self->_instance_is_inlinable ? $self->_generate_reader_method_inline(@_)
# spent 20.5ms making 29 calls to Class::MOP::Method::Accessor::_generate_reader_method_inline, avg 708µs/call # spent 322µs making 29 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 11µs/call
63 : $self->SUPER::_generate_reader_method(@_);
64}
65
66sub _generate_writer_method {
67 my $self = shift;
68 $self->_instance_is_inlinable ? $self->_generate_writer_method_inline(@_)
69 : $self->SUPER::_generate_writer_method(@_);
70}
71
72
# spent 26.8ms (146µs+26.7) within Moose::Meta::Method::Accessor::_generate_accessor_method which was called 30 times, avg 893µs/call: # 30 times (146µs+26.7ms) by Class::MOP::Method::Accessor::_initialize_body at line 90 of Class/MOP/Method/Accessor.pm, avg 893µs/call
sub _generate_accessor_method {
73306µs my $self = shift;
7430123µs6026.7ms $self->_instance_is_inlinable ? $self->_generate_accessor_method_inline(@_)
# spent 26.3ms making 30 calls to Class::MOP::Method::Accessor::_generate_accessor_method_inline, avg 878µs/call # spent 327µs making 30 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 11µs/call
75 : $self->SUPER::_generate_accessor_method(@_);
76}
77
78
# spent 722µs (26+696) within Moose::Meta::Method::Accessor::_generate_predicate_method which was called 2 times, avg 361µs/call: # 2 times (26µs+696µs) by Class::MOP::Method::Accessor::_initialize_body at line 90 of Class/MOP/Method/Accessor.pm, avg 361µs/call
sub _generate_predicate_method {
792700ns my $self = shift;
80216µs4696µs $self->_instance_is_inlinable ? $self->_generate_predicate_method_inline(@_)
# spent 675µs making 2 calls to Class::MOP::Method::Accessor::_generate_predicate_method_inline, avg 337µs/call # spent 21µs making 2 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 11µs/call
81 : $self->SUPER::_generate_predicate_method(@_);
82}
83
84
# spent 806µs (22+784) within Moose::Meta::Method::Accessor::_generate_clearer_method which was called 2 times, avg 403µs/call: # 2 times (22µs+784µs) by Class::MOP::Method::Accessor::_initialize_body at line 90 of Class/MOP/Method/Accessor.pm, avg 403µs/call
sub _generate_clearer_method {
8522µs my $self = shift;
86215µs4784µs $self->_instance_is_inlinable ? $self->_generate_clearer_method_inline(@_)
# spent 763µs making 2 calls to Class::MOP::Method::Accessor::_generate_clearer_method_inline, avg 381µs/call # spent 22µs making 2 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 11µs/call
87 : $self->SUPER::_generate_clearer_method(@_);
88}
89
90sub _writer_value_needs_copy {
91 shift->associated_attribute->_writer_value_needs_copy(@_);
92}
93
94sub _inline_tc_code {
95 shift->associated_attribute->_inline_tc_code(@_);
96}
97
98sub _inline_check_coercion {
99 shift->associated_attribute->_inline_check_coercion(@_);
100}
101
102sub _inline_check_constraint {
103 shift->associated_attribute->_inline_check_constraint(@_);
104}
105
106sub _inline_check_lazy {
107 shift->associated_attribute->_inline_check_lazy(@_);
108}
109
110sub _inline_store_value {
111 shift->associated_attribute->_inline_instance_set(@_) . ';';
112}
113
114sub _inline_get_old_value_for_trigger {
115 shift->associated_attribute->_inline_get_old_value_for_trigger(@_);
116}
117
118sub _inline_trigger {
119 shift->associated_attribute->_inline_trigger(@_);
120}
121
122sub _get_value {
123 shift->associated_attribute->_inline_instance_get(@_);
124}
125
126sub _has_value {
127 shift->associated_attribute->_inline_instance_has(@_);
128}
129
13013µs1;
131
132# ABSTRACT: A Moose Method metaclass for accessors
133
134__END__