← Index
NYTProf Performance Profile   « line view »
For examples/Atom-timer.pl
  Run on Mon Aug 12 14:45:28 2013
Reported on Mon Aug 12 14:46:14 2013

Filename/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Meta/Method/Accessor.pm
StatementsExecuted 925 statements in 2.82ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
9942704µs936µsMoose::Meta::Method::Accessor::::_instance_is_inlinableMoose::Meta::Method::Accessor::_instance_is_inlinable
6142494µs24.8msMoose::Meta::Method::Accessor::::_compile_codeMoose::Meta::Method::Accessor::_compile_code
6122259µs3.98msMoose::Meta::Method::Accessor::::_eval_environmentMoose::Meta::Method::Accessor::_eval_environment
4711195µs262µsMoose::Meta::Method::Accessor::::_error_throwerMoose::Meta::Method::Accessor::_error_thrower
2611111µs820µsMoose::Meta::Method::Accessor::::_get_valueMoose::Meta::Method::Accessor::_get_value
2622108µs5.83msMoose::Meta::Method::Accessor::::_inline_check_lazyMoose::Meta::Method::Accessor::_inline_check_lazy
2211106µs27.3msMoose::Meta::Method::Accessor::::_generate_accessor_methodMoose::Meta::Method::Accessor::_generate_accessor_method
262198µs197µsMoose::Meta::Method::Accessor::::_writer_value_needs_copyMoose::Meta::Method::Accessor::_writer_value_needs_copy
612289µs89µsMoose::Meta::Method::Accessor::::newMoose::Meta::Method::Accessor::new
131152µs110µsMoose::Meta::Method::Accessor::::_inline_triggerMoose::Meta::Method::Accessor::_inline_trigger
81145µs2.45msMoose::Meta::Method::Accessor::::_generate_predicate_methodMoose::Meta::Method::Accessor::_generate_predicate_method
351136µs36µsMoose::Meta::Method::Accessor::::_newMoose::Meta::Method::Accessor::_new
41128µs3.21msMoose::Meta::Method::Accessor::::_generate_reader_methodMoose::Meta::Method::Accessor::_generate_reader_method
1118µs8µsMoose::Meta::Method::Accessor::::BEGIN@3Moose::Meta::Method::Accessor::BEGIN@3
1116µs34µsMoose::Meta::Method::Accessor::::BEGIN@13Moose::Meta::Method::Accessor::BEGIN@13
1116µs89µsMoose::Meta::Method::Accessor::::BEGIN@15Moose::Meta::Method::Accessor::BEGIN@15
1116µs16µsMoose::Meta::Method::Accessor::::BEGIN@10Moose::Meta::Method::Accessor::BEGIN@10
1115µs8µsMoose::Meta::Method::Accessor::::BEGIN@11Moose::Meta::Method::Accessor::BEGIN@11
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_clearer_methodMoose::Meta::Method::Accessor::_generate_clearer_method
0000s0sMoose::Meta::Method::Accessor::::_generate_writer_methodMoose::Meta::Method::Accessor::_generate_writer_method
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_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
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 8µs within Moose::Meta::Method::Accessor::BEGIN@3 which was called: # once (8µs+0s) by Moose::Meta::Attribute::BEGIN@21 at line 5
BEGIN {
414µs $Moose::Meta::Method::Accessor::AUTHORITY = 'cpan:STEVAN';
5126µs18µs}
# spent 8µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@3
6{
72900ns $Moose::Meta::Method::Accessor::VERSION = '2.1005';
8}
9
10219µs226µs
# spent 16µs (6+10) within Moose::Meta::Method::Accessor::BEGIN@10 which was called: # once (6µs+10µs) by Moose::Meta::Attribute::BEGIN@21 at line 10
use strict;
# spent 16µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@10 # spent 10µs making 1 call to strict::import
11218µs211µs
# spent 8µs (5+3) within Moose::Meta::Method::Accessor::BEGIN@11 which was called: # once (5µs+3µs) by Moose::Meta::Attribute::BEGIN@21 at line 11
use warnings;
# spent 8µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@11 # spent 3µs making 1 call to warnings::import
12
13224µs261µs
# spent 34µs (6+27) within Moose::Meta::Method::Accessor::BEGIN@13 which was called: # once (6µs+27µs) by Moose::Meta::Attribute::BEGIN@21 at line 13
use Try::Tiny;
# spent 34µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@13 # spent 27µs making 1 call to Exporter::import
14
151200ns
# spent 89µs (6+83) within Moose::Meta::Method::Accessor::BEGIN@15 which was called: # once (6µs+83µs) by Moose::Meta::Attribute::BEGIN@21 at line 16
use base 'Moose::Meta::Method',
161518µs2172µs 'Class::MOP::Method::Accessor';
# spent 89µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@15 # spent 83µs making 1 call to base::import
17
18# multiple inheritance is terrible
19
# spent 89µs within Moose::Meta::Method::Accessor::new which was called 61 times, avg 1µs/call: # 35 times (51µs+0s) by Class::MOP::Attribute::try {...} at line 389 of Class/MOP/Attribute.pm, avg 1µs/call # 26 times (38µs+0s) by Class::MOP::Class:::around at line 42 of Moose/Meta/Method/Accessor/Native.pm, avg 1µs/call
sub new {
2061164µs6191.1ms goto &Class::MOP::Method::Accessor::new;
# spent 91.1ms making 61 calls to Class::MOP::Method::Accessor::new, avg 1.49ms/call
21}
22
23
# spent 36µs within Moose::Meta::Method::Accessor::_new which was called 35 times, avg 1µs/call: # 35 times (36µs+0s) by Class::MOP::Method::Accessor::new at line 35 of Class/MOP/Method/Accessor.pm, avg 1µs/call
sub _new {
243572µs3517.8ms goto &Class::MOP::Method::Accessor::_new;
# spent 17.8ms making 35 calls to Class::MOP::Method::Accessor::_new, avg 510µs/call
25}
26
27
# spent 262µs (195+67) within Moose::Meta::Method::Accessor::_error_thrower which was called 47 times, avg 6µs/call: # 47 times (195µs+67µs) by Moose::Meta::Method::_inline_throw_error at line 37 of Moose/Meta/Method.pm, avg 6µs/call
sub _error_thrower {
28475µs my $self = shift;
2947130µs9467µs return $self->associated_attribute
# spent 67µs making 94 calls to Class::MOP::Method::Accessor::associated_attribute, avg 716ns/call
30 if ref($self) && defined($self->associated_attribute);
31 return $self->SUPER::_error_thrower;
32}
33
34
# spent 24.8ms (494µs+24.3) within Moose::Meta::Method::Accessor::_compile_code which was called 61 times, avg 407µs/call: # 26 times (202µs+12.0ms) by Moose::Meta::Method::Accessor::Native::_initialize_body at line 57 of Moose/Meta/Method/Accessor/Native.pm, avg 471µs/call # 22 times (186µs+8.90ms) by Class::MOP::Method::Accessor::try {...} at line 112 of Class/MOP/Method/Accessor.pm, avg 413µs/call # 8 times (57µs+1.83ms) by Class::MOP::Method::Accessor::try {...} at line 204 of Class/MOP/Method/Accessor.pm, avg 235µs/call # 5 times (49µs+1.55ms) by Class::MOP::Method::Accessor::try {...} at line 142 of Class/MOP/Method/Accessor.pm, avg 320µs/call
sub _compile_code {
35618µs my $self = shift;
366125µs my @args = @_;
37 try {
3861130µs6123.0ms $self->SUPER::_compile_code(@args);
# spent 23.0ms making 61 calls to Class::MOP::Method::Generated::_compile_code, avg 376µ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 );
4761382µs122141µs };
# spent 141µs making 61 calls to Try::Tiny::catch, avg 2µs/call # spent 24.2ms making 61 calls to Try::Tiny::try, avg 396µs/call, recursion: max depth 4, sum of overlapping time 24.2ms
48}
49
50
# spent 3.98ms (259µs+3.72) within Moose::Meta::Method::Accessor::_eval_environment which was called 61 times, avg 65µs/call: # 35 times (152µs+2.03ms) by Class::MOP::Method::Generated::_compile_code at line 59 of Class/MOP/Method/Generated.pm, avg 62µs/call # 26 times (107µs+1.69ms) by Moose::Role::super at line 77 of Moose/Role.pm, avg 69µs/call
sub _eval_environment {
51616µs my $self = shift;
5261154µs1223.72ms return $self->associated_attribute->_eval_environment;
# spent 3.66ms making 61 calls to Moose::Meta::Attribute::_eval_environment, avg 60µs/call # spent 56µs making 61 calls to Class::MOP::Method::Accessor::associated_attribute, avg 913ns/call
53}
54
55
# spent 936µs (704+232) within Moose::Meta::Method::Accessor::_instance_is_inlinable which was called 99 times, avg 9µs/call: # 65 times (460µs+151µs) by Moose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined at line 161 of Moose/Meta/Method/Accessor/Native.pm, avg 9µs/call # 22 times (151µs+52µs) by Moose::Meta::Method::Accessor::_generate_accessor_method at line 74, avg 9µs/call # 8 times (52µs+19µs) by Moose::Meta::Method::Accessor::_generate_predicate_method at line 80, avg 9µs/call # 4 times (40µs+10µs) by Moose::Meta::Method::Accessor::_generate_reader_method at line 62, avg 13µs/call
sub _instance_is_inlinable {
56998µs my $self = shift;
5799645µs396232µs return $self->associated_attribute->associated_class->instance_metaclass->is_inlinable;
# spent 74µs making 99 calls to Class::MOP::Method::Accessor::associated_attribute, avg 752ns/call # spent 69µs making 99 calls to Class::MOP::Instance::is_inlinable, avg 696ns/call # spent 46µs making 99 calls to Class::MOP::Attribute::associated_class, avg 462ns/call # spent 43µs making 99 calls to Class::MOP::Class::instance_metaclass, avg 437ns/call
58}
59
60
# spent 3.21ms (28µs+3.18) within Moose::Meta::Method::Accessor::_generate_reader_method which was called 4 times, avg 802µs/call: # 4 times (28µs+3.18ms) by Class::MOP::Method::Accessor::_initialize_body at line 90 of Class/MOP/Method/Accessor.pm, avg 802µs/call
sub _generate_reader_method {
614900ns my $self = shift;
62419µs83.18ms $self->_instance_is_inlinable ? $self->_generate_reader_method_inline(@_)
# spent 3.13ms making 4 calls to Class::MOP::Method::Accessor::_generate_reader_method_inline, avg 782µs/call # spent 51µs making 4 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 13µ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 27.3ms (106µs+27.2) within Moose::Meta::Method::Accessor::_generate_accessor_method which was called 22 times, avg 1.24ms/call: # 22 times (106µs+27.2ms) by Class::MOP::Method::Accessor::_initialize_body at line 90 of Class/MOP/Method/Accessor.pm, avg 1.24ms/call
sub _generate_accessor_method {
73223µs my $self = shift;
742268µs4427.2ms $self->_instance_is_inlinable ? $self->_generate_accessor_method_inline(@_)
# spent 27.0ms making 22 calls to Class::MOP::Method::Accessor::_generate_accessor_method_inline, avg 1.23ms/call # spent 204µs making 22 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 9µs/call
75 : $self->SUPER::_generate_accessor_method(@_);
76}
77
78
# spent 2.45ms (45µs+2.40) within Moose::Meta::Method::Accessor::_generate_predicate_method which was called 8 times, avg 306µs/call: # 8 times (45µs+2.40ms) by Class::MOP::Method::Accessor::_initialize_body at line 90 of Class/MOP/Method/Accessor.pm, avg 306µs/call
sub _generate_predicate_method {
7982µs my $self = shift;
80832µs162.40ms $self->_instance_is_inlinable ? $self->_generate_predicate_method_inline(@_)
# spent 2.33ms making 8 calls to Class::MOP::Method::Accessor::_generate_predicate_method_inline, avg 291µs/call # spent 71µs making 8 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 9µs/call
81 : $self->SUPER::_generate_predicate_method(@_);
82}
83
84sub _generate_clearer_method {
85 my $self = shift;
86 $self->_instance_is_inlinable ? $self->_generate_clearer_method_inline(@_)
87 : $self->SUPER::_generate_clearer_method(@_);
88}
89
90
# spent 197µs (98+99) within Moose::Meta::Method::Accessor::_writer_value_needs_copy which was called 26 times, avg 8µs/call: # 13 times (53µs+48µs) by Moose::Meta::Method::Accessor::Native::Writer::_inline_copy_native_value at line 115 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 8µs/call # 13 times (44µs+51µs) by Moose::Meta::Method::Accessor::Native::Writer::_inline_set_new_value at line 149 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 7µs/call
sub _writer_value_needs_copy {
912664µs5299µs shift->associated_attribute->_writer_value_needs_copy(@_);
# spent 82µs making 26 calls to Moose::Meta::Attribute::_writer_value_needs_copy, avg 3µs/call # spent 17µs making 26 calls to Class::MOP::Method::Accessor::associated_attribute, avg 654ns/call
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
106
# spent 5.83ms (108µs+5.72) within Moose::Meta::Method::Accessor::_inline_check_lazy which was called 26 times, avg 224µs/call: # 13 times (56µs+2.90ms) by Moose::Meta::Method::Accessor::Native::Reader::_inline_reader_core at line 38 of Moose/Meta/Method/Accessor/Native/Reader.pm, avg 227µs/call # 13 times (52µs+2.82ms) by Moose::Meta::Method::Accessor::Native::Writer::_inline_writer_core at line 44 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 221µs/call
sub _inline_check_lazy {
1072676µs525.72ms shift->associated_attribute->_inline_check_lazy(@_);
# spent 5.70ms making 26 calls to Moose::Meta::Attribute::_inline_check_lazy, avg 219µs/call # spent 22µs making 26 calls to Class::MOP::Method::Accessor::associated_attribute, avg 862ns/call
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
118
# spent 110µs (52+58) within Moose::Meta::Method::Accessor::_inline_trigger which was called 13 times, avg 8µs/call: # 13 times (52µs+58µs) by Moose::Meta::Method::Accessor::Native::Writer::_inline_writer_core at line 57 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 8µs/call
sub _inline_trigger {
11913136µs2658µs shift->associated_attribute->_inline_trigger(@_);
# spent 50µs making 13 calls to Moose::Meta::Attribute::_inline_trigger, avg 4µs/call # spent 8µs making 13 calls to Class::MOP::Method::Accessor::associated_attribute, avg 608ns/call
120}
121
122
# spent 820µs (111+709) within Moose::Meta::Method::Accessor::_get_value which was called 26 times, avg 32µs/call: # 26 times (111µs+709µs) by Moose::Role::super at line 77 of Moose/Role.pm, avg 32µs/call
sub _get_value {
1232676µs52709µs shift->associated_attribute->_inline_instance_get(@_);
# spent 693µs making 26 calls to Class::MOP::Attribute::_inline_instance_get, avg 27µs/call # spent 16µs making 26 calls to Class::MOP::Method::Accessor::associated_attribute, avg 619ns/call
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__