← Index
NYTProf Performance Profile   « line view »
For /home/ss5/perl5/perlbrew/perls/perl-5.22.0/bin/benchmarkanything-storage
  Run on Mon Jan 29 16:55:34 2018
Reported on Mon Jan 29 16:57:06 2018

Filename/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/Moose/Meta/Method/Accessor.pm
StatementsExecuted 80 statements in 551µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
52143µs54µsMoose::Meta::Method::Accessor::::_instance_is_inlinableMoose::Meta::Method::Accessor::_instance_is_inlinable
62141µs1.81msMoose::Meta::Method::Accessor::::_compile_codeMoose::Meta::Method::Accessor::_compile_code
61127µs359µsMoose::Meta::Method::Accessor::::_eval_environmentMoose::Meta::Method::Accessor::_eval_environment
41118µs2.51msMoose::Meta::Method::Accessor::::_generate_accessor_methodMoose::Meta::Method::Accessor::_generate_accessor_method
61117µs1.66msMoose::Meta::Method::Accessor::::try {...} Moose::Meta::Method::Accessor::try {...}
61113µs13µsMoose::Meta::Method::Accessor::::newMoose::Meta::Method::Accessor::new
1119µs11µsMoose::Meta::Method::Accessor::::BEGIN@4Moose::Meta::Method::Accessor::BEGIN@4
1118µs476µsMoose::Meta::Method::Accessor::::_generate_reader_methodMoose::Meta::Method::Accessor::_generate_reader_method
6118µs8µsMoose::Meta::Method::Accessor::::_newMoose::Meta::Method::Accessor::_new
1116µs12µsMoose::Meta::Method::Accessor::::BEGIN@5Moose::Meta::Method::Accessor::BEGIN@5
1116µs161µsMoose::Meta::Method::Accessor::::BEGIN@12Moose::Meta::Method::Accessor::BEGIN@12
1115µs36µsMoose::Meta::Method::Accessor::::BEGIN@9Moose::Meta::Method::Accessor::BEGIN@9
1114µs21µsMoose::Meta::Method::Accessor::::BEGIN@7Moose::Meta::Method::Accessor::BEGIN@7
0000s0sMoose::Meta::Method::Accessor::::__ANON__[:35]Moose::Meta::Method::Accessor::__ANON__[:35]
0000s0sMoose::Meta::Method::Accessor::::__ANON__[:41]Moose::Meta::Method::Accessor::__ANON__[:41]
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::::_generate_predicate_methodMoose::Meta::Method::Accessor::_generate_predicate_method
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
0000s0sMoose::Meta::Method::Accessor::::catch {...} Moose::Meta::Method::Accessor::catch {...}
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::Accessor;
21200nsour $VERSION = '2.1605';
3
4214µs213µs
# spent 11µs (9+2) within Moose::Meta::Method::Accessor::BEGIN@4 which was called: # once (9µs+2µs) by Moose::Meta::Attribute::BEGIN@13 at line 4
use strict;
# spent 11µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@4 # spent 2µs making 1 call to strict::import
5212µs218µs
# spent 12µs (6+6) within Moose::Meta::Method::Accessor::BEGIN@5 which was called: # once (6µs+6µs) by Moose::Meta::Attribute::BEGIN@13 at line 5
use warnings;
# spent 12µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@5 # spent 6µs making 1 call to warnings::import
6
7216µs238µs
# spent 21µs (4+17) within Moose::Meta::Method::Accessor::BEGIN@7 which was called: # once (4µs+17µs) by Moose::Meta::Attribute::BEGIN@13 at line 7
use Try::Tiny;
# spent 21µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@7 # spent 17µs making 1 call to Exporter::import
8
914µs130µs
# spent 36µs (5+30) within Moose::Meta::Method::Accessor::BEGIN@9 which was called: # once (5µs+30µs) by Moose::Meta::Attribute::BEGIN@13 at line 10
use parent 'Moose::Meta::Method',
# spent 30µs making 1 call to parent::import
10113µs136µs 'Class::MOP::Method::Accessor';
# spent 36µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@9
11
122321µs2316µs
# spent 161µs (6+155) within Moose::Meta::Method::Accessor::BEGIN@12 which was called: # once (6µs+155µs) by Moose::Meta::Attribute::BEGIN@13 at line 12
use Moose::Util 'throw_exception';
# spent 161µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@12 # spent 155µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337]
13
14# multiple inheritance is terrible
15
# spent 13µs within Moose::Meta::Method::Accessor::new which was called 6 times, avg 2µs/call: # 6 times (13µs+0s) by Class::MOP::Attribute::try {...} at line 407 of Class/MOP/Attribute.pm, avg 2µs/call
sub new {
16618µs64.74ms goto &Class::MOP::Method::Accessor::new;
# spent 4.74ms making 6 calls to Class::MOP::Method::Accessor::new, avg 789µs/call
17}
18
19
# spent 8µs within Moose::Meta::Method::Accessor::_new which was called 6 times, avg 1µs/call: # 6 times (8µs+0s) by Class::MOP::Method::Accessor::new at line 36 of Class/MOP/Method/Accessor.pm, avg 1µs/call
sub _new {
20612µs61.23ms goto &Class::MOP::Method::Accessor::_new;
# spent 1.23ms making 6 calls to Class::MOP::Method::Accessor::_new, avg 205µs/call
21}
22
23sub _error_thrower {
24 my $self = shift;
25 return $self->associated_attribute
26 if ref($self) && defined($self->associated_attribute);
27 return $self->SUPER::_error_thrower;
28}
29
30
# spent 1.81ms (41µs+1.77) within Moose::Meta::Method::Accessor::_compile_code which was called 6 times, avg 302µs/call: # 4 times (23µs+1.27ms) by Class::MOP::Method::Accessor::try {...} at line 113 of Class/MOP/Method/Accessor.pm, avg 323µs/call # 2 times (18µs+499µs) by Class::MOP::Method::Accessor::try {...} at line 151 of Class/MOP/Method/Accessor.pm, avg 259µs/call
sub _compile_code {
3162µs my $self = shift;
3263µs my @args = @_;
33
# spent 1.66ms (17µs+1.64) within Moose::Meta::Method::Accessor::try {...} which was called 6 times, avg 276µs/call: # 6 times (17µs+1.64ms) by Try::Tiny::try at line 87 of Try/Tiny.pm, avg 276µs/call
try {
34617µs61.64ms $self->SUPER::_compile_code(@args);
# spent 1.64ms making 6 calls to Class::MOP::Method::Generated::_compile_code, avg 273µs/call
35 }
36 catch {
37 throw_exception( CouldNotCreateWriter => attribute => $self->associated_attribute,
38 error => $_,
39 instance => $self
40 );
41633µs1239µs };
# spent 39µs making 6 calls to Try::Tiny::catch, avg 6µs/call # spent 1.73ms making 6 calls to Try::Tiny::try, avg 289µs/call, recursion: max depth 3, sum of overlapping time 1.73ms
42}
43
44
# spent 359µs (27+332) within Moose::Meta::Method::Accessor::_eval_environment which was called 6 times, avg 60µs/call: # 6 times (27µs+332µs) by Class::MOP::Method::Generated::_compile_code at line 52 of Class/MOP/Method/Generated.pm, avg 60µs/call
sub _eval_environment {
4561µs my $self = shift;
46617µs12332µs return $self->associated_attribute->_eval_environment;
# spent 328µs making 6 calls to Moose::Meta::Attribute::_eval_environment, avg 55µs/call # spent 4µs making 6 calls to Class::MOP::Method::Accessor::associated_attribute, avg 667ns/call
47}
48
49
# spent 54µs (43+11) within Moose::Meta::Method::Accessor::_instance_is_inlinable which was called 5 times, avg 11µs/call: # 4 times (29µs+9µs) by Moose::Meta::Method::Accessor::_generate_accessor_method at line 68, avg 10µs/call # once (14µs+2µs) by Moose::Meta::Method::Accessor::_generate_reader_method at line 56
sub _instance_is_inlinable {
5051µs my $self = shift;
51543µs2011µs return $self->associated_attribute->associated_class->instance_metaclass->is_inlinable;
# spent 4µs making 5 calls to Class::MOP::Instance::is_inlinable, avg 820ns/call # spent 3µs making 5 calls to Class::MOP::Method::Accessor::associated_attribute, avg 640ns/call # spent 2µs making 5 calls to Class::MOP::Class::instance_metaclass, avg 480ns/call # spent 2µs making 5 calls to Class::MOP::Attribute::associated_class, avg 300ns/call
52}
53
54
# spent 476µs (8+468) within Moose::Meta::Method::Accessor::_generate_reader_method which was called: # once (8µs+468µs) by Class::MOP::Method::Accessor::_initialize_body at line 91 of Class/MOP/Method/Accessor.pm
sub _generate_reader_method {
551400ns my $self = shift;
5617µs2468µs $self->_instance_is_inlinable ? $self->_generate_reader_method_inline(@_)
57 : $self->SUPER::_generate_reader_method(@_);
58}
59
60sub _generate_writer_method {
61 my $self = shift;
62 $self->_instance_is_inlinable ? $self->_generate_writer_method_inline(@_)
63 : $self->SUPER::_generate_writer_method(@_);
64}
65
66
# spent 2.51ms (18µs+2.50) within Moose::Meta::Method::Accessor::_generate_accessor_method which was called 4 times, avg 628µs/call: # 4 times (18µs+2.50ms) by Class::MOP::Method::Accessor::_initialize_body at line 91 of Class/MOP/Method/Accessor.pm, avg 628µs/call
sub _generate_accessor_method {
674700ns my $self = shift;
68415µs82.50ms $self->_instance_is_inlinable ? $self->_generate_accessor_method_inline(@_)
# spent 2.46ms making 4 calls to Class::MOP::Method::Accessor::_generate_accessor_method_inline, avg 615µs/call # spent 38µs making 4 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 10µs/call
69 : $self->SUPER::_generate_accessor_method(@_);
70}
71
72sub _generate_predicate_method {
73 my $self = shift;
74 $self->_instance_is_inlinable ? $self->_generate_predicate_method_inline(@_)
75 : $self->SUPER::_generate_predicate_method(@_);
76}
77
78sub _generate_clearer_method {
79 my $self = shift;
80 $self->_instance_is_inlinable ? $self->_generate_clearer_method_inline(@_)
81 : $self->SUPER::_generate_clearer_method(@_);
82}
83
84sub _writer_value_needs_copy {
85 shift->associated_attribute->_writer_value_needs_copy(@_);
86}
87
88sub _inline_tc_code {
89 shift->associated_attribute->_inline_tc_code(@_);
90}
91
92sub _inline_check_coercion {
93 shift->associated_attribute->_inline_check_coercion(@_);
94}
95
96sub _inline_check_constraint {
97 shift->associated_attribute->_inline_check_constraint(@_);
98}
99
100sub _inline_check_lazy {
101 shift->associated_attribute->_inline_check_lazy(@_);
102}
103
104sub _inline_store_value {
105 shift->associated_attribute->_inline_instance_set(@_) . ';';
106}
107
108sub _inline_get_old_value_for_trigger {
109 shift->associated_attribute->_inline_get_old_value_for_trigger(@_);
110}
111
112sub _inline_trigger {
113 shift->associated_attribute->_inline_trigger(@_);
114}
115
116sub _get_value {
117 shift->associated_attribute->_inline_instance_get(@_);
118}
119
120sub _has_value {
121 shift->associated_attribute->_inline_instance_has(@_);
122}
123
12412µs1;
125
126# ABSTRACT: A Moose Method metaclass for accessors
127
128__END__