| Filename | /home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux/Mouse/Meta/Class.pm |
| Statements | Executed 3228 statements in 15.3ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 2 | 2 | 412ms | 104s | Hailo::Command::train_progress |
| 68 | 2 | 2 | 3.44ms | 30.7ms | Mouse::Meta::Class::add_attribute (recurses: max depth 1, inclusive time 588µs) |
| 16 | 7 | 6 | 2.48ms | 3.42ms | Mouse::Meta::Class::_calculate_all_attributes |
| 97 | 3 | 3 | 2.39ms | 4.51ms | Mouse::Meta::Class::does_role |
| 31 | 3 | 2 | 581µs | 47.7ms | Mouse::Meta::Class::superclasses (recurses: max depth 1, inclusive time 174µs) |
| 9 | 3 | 1 | 351µs | 450µs | Mouse::Meta::Class::_install_modifier |
| 7 | 7 | 7 | 335µs | 837µs | Mouse::Meta::Class::make_immutable |
| 14 | 1 | 1 | 320µs | 320µs | Mouse::Meta::Class::_construct_meta |
| 34 | 3 | 3 | 308µs | 1.13ms | Mouse::Meta::Class::_initialize_object (xsub) |
| 25 | 1 | 1 | 306µs | 306µs | Mouse::Meta::Class::CORE:sort (opcode) |
| 113 | 2 | 1 | 253µs | 253µs | Mouse::Meta::Class::linearized_isa (xsub) |
| 26 | 3 | 3 | 236µs | 3.22ms | Mouse::Meta::Class::get_all_attributes (xsub) |
| 16 | 1 | 1 | 222µs | 276µs | Mouse::Meta::Class::verify_superclass |
| 7 | 1 | 1 | 216µs | 2.90ms | Mouse::Meta::Class::find_attribute_by_name |
| 26 | 1 | 1 | 199µs | 3.01ms | Mouse::Meta::Class::create_anon_class |
| 25 | 1 | 1 | 184µs | 52.3ms | Mouse::Meta::Class::__ANON__[:379] |
| 22 | 1 | 1 | 167µs | 3.76ms | Hailo::Command::_get_cmd_flags_for_attr |
| 100 | 1 | 1 | 145µs | 145µs | Mouse::Meta::Class::roles (xsub) |
| 2 | 2 | 2 | 107µs | 104s | Hailo::Command::run |
| 68 | 1 | 1 | 104µs | 104µs | Mouse::Meta::Class::CORE:subst (opcode) |
| 61 | 1 | 1 | 103µs | 103µs | Mouse::Meta::Class::attribute_metaclass (xsub) |
| 3 | 1 | 1 | 75µs | 170µs | Mouse::Meta::Class::add_override_method_modifier |
| 21 | 8 | 7 | 59µs | 59µs | Mouse::Meta::Class::strict_constructor (xsub) |
| 1 | 1 | 1 | 41µs | 4.47ms | Hailo::Storage::SQLite::stop_training |
| 7 | 1 | 1 | 41µs | 41µs | Mouse::Meta::Class::immutable_options |
| 4 | 2 | 2 | 37µs | 275µs | Mouse::Meta::Class::add_around_method_modifier |
| 4 | 1 | 1 | 34µs | 205µs | Mouse::Meta::Class::add_before_method_modifier |
| 16 | 7 | 6 | 26µs | 26µs | Mouse::Meta::Class::is_immutable (xsub) |
| 1 | 1 | 1 | 24µs | 102µs | Mouse::Meta::Class::BEGIN@2 |
| 16 | 7 | 6 | 23µs | 23µs | Mouse::Meta::Class::is_anon_class (xsub) |
| 1 | 1 | 1 | 19µs | 53.0ms | Hailo::Storage::SQLite::start_training |
| 1 | 1 | 1 | 18µs | 5.51ms | Hailo::Storage::SQLite::_engage |
| 1 | 1 | 1 | 15µs | 51.8s | Hailo::Command::_train_fh |
| 1 | 1 | 1 | 14µs | 316µs | Hailo::Storage::SQLite::initialized |
| 7 | 1 | 1 | 13µs | 13µs | Mouse::Meta::Class::constructor_class (xsub) |
| 1 | 1 | 1 | 13µs | 38µs | Hailo::Storage::SQLite::_build_dbd_options |
| 1 | 1 | 1 | 11µs | 48.2ms | Hailo::Command::_getopt_get_options |
| 1 | 1 | 1 | 11µs | 32µs | Mouse::Meta::Class::BEGIN@26 |
| 7 | 1 | 1 | 10µs | 10µs | Mouse::Meta::Class::destructor_class (xsub) |
| 1 | 1 | 1 | 9µs | 51µs | Mouse::Meta::Class::add_after_method_modifier |
| 1 | 1 | 1 | 9µs | 176µs | Hailo::Storage::SQLite::_build_dbi_options |
| 1 | 1 | 1 | 9µs | 282µs | Hailo::Command::_getopt_spec |
| 1 | 1 | 1 | 6µs | 6µs | Mouse::Meta::Class::BEGIN@6 |
| 1 | 1 | 1 | 6µs | 6µs | Mouse::Meta::Class::BEGIN@4 |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::__ANON__[:354] |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::__ANON__[:417] |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::__ANON__[:437] |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::_collect_roles |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::_reconcile_with_superclass_meta |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::add_augment_method_modifier |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::calculate_all_roles |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::find_method_by_name |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::get_all_method_names |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::get_all_methods |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::inherit_from_foreign_class |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::is_mutable |
| 0 | 0 | 0 | 0s | 0s | Mouse::Meta::Class::make_mutable |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Mouse::Meta::Class; | ||||
| 2 | 2 | 28µs | 2 | 180µs | # spent 102µs (24+78) within Mouse::Meta::Class::BEGIN@2 which was called:
# once (24µs+78µs) by Mouse::BEGIN@14 at line 2 # spent 102µs making 1 call to Mouse::Meta::Class::BEGIN@2
# spent 78µs making 1 call to Mouse::Exporter::do_import |
| 3 | |||||
| 4 | 2 | 24µs | 1 | 6µs | # spent 6µs within Mouse::Meta::Class::BEGIN@4 which was called:
# once (6µs+0s) by Mouse::BEGIN@14 at line 4 # spent 6µs making 1 call to Mouse::Meta::Class::BEGIN@4 |
| 5 | |||||
| 6 | 2 | 89µs | 1 | 6µs | # spent 6µs within Mouse::Meta::Class::BEGIN@6 which was called:
# once (6µs+0s) by Mouse::BEGIN@14 at line 6 # spent 6µs making 1 call to Mouse::Meta::Class::BEGIN@6 |
| 7 | 1 | 6µs | our @ISA = qw(Mouse::Meta::Module); | ||
| 8 | |||||
| 9 | 1 | 1µs | our @CARP_NOT = qw(Mouse); # trust Mouse | ||
| 10 | |||||
| 11 | sub attribute_metaclass; | ||||
| 12 | sub method_metaclass; | ||||
| 13 | |||||
| 14 | sub constructor_class; | ||||
| 15 | sub destructor_class; | ||||
| 16 | |||||
| 17 | |||||
| 18 | # spent 320µs within Mouse::Meta::Class::_construct_meta which was called 14 times, avg 23µs/call:
# 14 times (320µs+0s) by Mouse::Meta::Module::initialize at line 29 of Mouse/Meta/Module.pm, avg 23µs/call | ||||
| 19 | 14 | 33µs | my($class, %args) = @_; | ||
| 20 | |||||
| 21 | 14 | 26µs | $args{attributes} = {}; | ||
| 22 | 14 | 22µs | $args{methods} = {}; | ||
| 23 | 14 | 23µs | $args{roles} = []; | ||
| 24 | |||||
| 25 | 14 | 35µs | $args{superclasses} = do { | ||
| 26 | 2 | 1.94ms | 2 | 54µs | # spent 32µs (11+22) within Mouse::Meta::Class::BEGIN@26 which was called:
# once (11µs+22µs) by Mouse::BEGIN@14 at line 26 # spent 32µs making 1 call to Mouse::Meta::Class::BEGIN@26
# spent 22µs making 1 call to strict::unimport |
| 27 | 14 | 64µs | \@{ $args{package} . '::ISA' }; | ||
| 28 | }; | ||||
| 29 | |||||
| 30 | 14 | 48µs | my $self = bless \%args, ref($class) || $class; | ||
| 31 | 14 | 23µs | if(ref($self) ne __PACKAGE__){ | ||
| 32 | $self->meta->_initialize_object($self, \%args); | ||||
| 33 | } | ||||
| 34 | 14 | 71µs | return $self; | ||
| 35 | } | ||||
| 36 | |||||
| 37 | # spent 3.01ms (199µs+2.81) within Mouse::Meta::Class::create_anon_class which was called 26 times, avg 116µs/call:
# 26 times (199µs+2.81ms) by Mouse::Meta::Attribute::interpolate_class at line 129 of Mouse/Meta/Attribute.pm, avg 116µs/call | ||||
| 38 | 26 | 31µs | my $self = shift; | ||
| 39 | 26 | 162µs | 26 | 2.81ms | return $self->create(undef, @_); # spent 2.81ms making 26 calls to Mouse::Meta::Module::create, avg 108µs/call |
| 40 | } | ||||
| 41 | |||||
| 42 | sub is_anon_class; | ||||
| 43 | |||||
| 44 | sub roles; | ||||
| 45 | |||||
| 46 | sub calculate_all_roles { | ||||
| 47 | my $self = shift; | ||||
| 48 | my %seen; | ||||
| 49 | return grep { !$seen{ $_->name }++ } | ||||
| 50 | map { $_->calculate_all_roles } @{ $self->roles }; | ||||
| 51 | } | ||||
| 52 | |||||
| 53 | # spent 47.7ms (581µs+47.1) within Mouse::Meta::Class::superclasses which was called 31 times, avg 1.54ms/call:
# 25 times (401µs+285µs) by Mouse::init_meta at line 139 of Mouse.pm, avg 27µs/call
# 4 times (125µs+46.7ms) by Mouse::extends at line 35 of Mouse.pm, avg 11.7ms/call
# 2 times (55µs+78µs) by Mouse::Meta::Module::create at line 238 of Mouse/Meta/Module.pm, avg 67µs/call | ||||
| 54 | 31 | 38µs | my $self = shift; | ||
| 55 | |||||
| 56 | 31 | 39µs | if (@_) { | ||
| 57 | 16 | 67µs | foreach my $super(@_){ | ||
| 58 | 16 | 63µs | 16 | 46.8ms | Mouse::Util::load_class($super); # spent 46.9ms making 16 calls to Mouse::Util::load_class, avg 2.93ms/call, recursion: max depth 2, sum of overlapping time 169µs |
| 59 | 16 | 63µs | 16 | 50µs | my $meta = Mouse::Util::get_metaclass_by_name($super); # spent 50µs making 16 calls to Mouse::Meta::Module::_get_metaclass_by_name, avg 3µs/call |
| 60 | 16 | 74µs | 16 | 276µs | next if $self->verify_superclass($super, $meta); # spent 276µs making 16 calls to Mouse::Meta::Class::verify_superclass, avg 17µs/call |
| 61 | $self->_reconcile_with_superclass_meta($meta); | ||||
| 62 | } | ||||
| 63 | 16 | 169µs | return @{ $self->{superclasses} } = @_; | ||
| 64 | } | ||||
| 65 | |||||
| 66 | 15 | 67µs | return @{ $self->{superclasses} }; | ||
| 67 | } | ||||
| 68 | |||||
| 69 | # spent 276µs (222+54) within Mouse::Meta::Class::verify_superclass which was called 16 times, avg 17µs/call:
# 16 times (222µs+54µs) by Mouse::Meta::Class::superclasses at line 60, avg 17µs/call | ||||
| 70 | 16 | 28µs | my($self, $super, $super_meta) = @_; | ||
| 71 | |||||
| 72 | 16 | 42µs | 2 | 13µs | if(defined $super_meta) { # spent 13µs making 2 calls to Mouse::Util::is_a_metarole, avg 6µs/call |
| 73 | if(Mouse::Util::is_a_metarole($super_meta)){ | ||||
| 74 | $self->throw_error("You cannot inherit from a Mouse Role ($super)"); | ||||
| 75 | } | ||||
| 76 | } | ||||
| 77 | else { | ||||
| 78 | # The metaclass of $super is not initialized. | ||||
| 79 | # i.e. it might be Mouse::Object, a mixin package (e.g. Exporter), | ||||
| 80 | # or a foreign class including Moose classes. | ||||
| 81 | # See also Mouse::Foreign::Meta::Role::Class. | ||||
| 82 | 14 | 114µs | 14 | 37µs | my $mm = $super->can('meta'); # spent 37µs making 14 calls to UNIVERSAL::can, avg 3µs/call |
| 83 | 14 | 29µs | if(!($mm && $mm == \&Mouse::Util::meta)) { | ||
| 84 | if($super->can('new') or $super->can('DESTROY')) { | ||||
| 85 | $self->inherit_from_foreign_class($super); | ||||
| 86 | } | ||||
| 87 | } | ||||
| 88 | 14 | 56µs | return 1; # always ok | ||
| 89 | } | ||||
| 90 | |||||
| 91 | 2 | 21µs | 2 | 5µs | return $self->isa(ref $super_meta); # checks metaclass compatibility # spent 5µs making 2 calls to UNIVERSAL::isa, avg 2µs/call |
| 92 | } | ||||
| 93 | |||||
| 94 | sub inherit_from_foreign_class { | ||||
| 95 | my($class, $super) = @_; | ||||
| 96 | Carp::carp("You inherit from non-Mouse class ($super)," | ||||
| 97 | . " but it is unlikely to work correctly." | ||||
| 98 | . " Please consider using MouseX::Foreign"); | ||||
| 99 | return; | ||||
| 100 | } | ||||
| 101 | |||||
| 102 | 1 | 2µs | my @MetaClassTypes = ( | ||
| 103 | 'attribute', # Mouse::Meta::Attribute | ||||
| 104 | 'method', # Mouse::Meta::Method | ||||
| 105 | 'constructor', # Mouse::Meta::Method::Constructor | ||||
| 106 | 'destructor', # Mouse::Meta::Method::Destructor | ||||
| 107 | ); | ||||
| 108 | |||||
| 109 | sub _reconcile_with_superclass_meta { | ||||
| 110 | my($self, $other) = @_; | ||||
| 111 | |||||
| 112 | # find incompatible traits | ||||
| 113 | my %metaroles; | ||||
| 114 | foreach my $metaclass_type(@MetaClassTypes){ | ||||
| 115 | my $accessor = $self->can($metaclass_type . '_metaclass') | ||||
| 116 | || $self->can($metaclass_type . '_class'); | ||||
| 117 | |||||
| 118 | my $other_c = $other->$accessor(); | ||||
| 119 | my $self_c = $self->$accessor(); | ||||
| 120 | |||||
| 121 | if(!$self_c->isa($other_c)){ | ||||
| 122 | $metaroles{$metaclass_type} | ||||
| 123 | = [ $self_c->meta->_collect_roles($other_c->meta) ]; | ||||
| 124 | } | ||||
| 125 | } | ||||
| 126 | |||||
| 127 | $metaroles{class} = [$self->meta->_collect_roles($other->meta)]; | ||||
| 128 | |||||
| 129 | #use Data::Dumper; print Data::Dumper->new([\%metaroles], ['*metaroles'])->Indent(1)->Dump; | ||||
| 130 | |||||
| 131 | require Mouse::Util::MetaRole; | ||||
| 132 | $_[0] = Mouse::Util::MetaRole::apply_metaroles( | ||||
| 133 | for => $self, | ||||
| 134 | class_metaroles => \%metaroles, | ||||
| 135 | ); | ||||
| 136 | return; | ||||
| 137 | } | ||||
| 138 | |||||
| 139 | sub _collect_roles { | ||||
| 140 | my ($self, $other) = @_; | ||||
| 141 | |||||
| 142 | # find common ancestor | ||||
| 143 | my @self_lin_isa = $self->linearized_isa; | ||||
| 144 | my @other_lin_isa = $other->linearized_isa; | ||||
| 145 | |||||
| 146 | my(@self_anon_supers, @other_anon_supers); | ||||
| 147 | push @self_anon_supers, shift @self_lin_isa while $self_lin_isa[0]->meta->is_anon_class; | ||||
| 148 | push @other_anon_supers, shift @other_lin_isa while $other_lin_isa[0]->meta->is_anon_class; | ||||
| 149 | |||||
| 150 | my $common_ancestor = $self_lin_isa[0] eq $other_lin_isa[0] && $self_lin_isa[0]; | ||||
| 151 | |||||
| 152 | if(!$common_ancestor){ | ||||
| 153 | $self->throw_error(sprintf '%s cannot have %s as a super class because of their metaclass incompatibility', | ||||
| 154 | $self->name, $other->name); | ||||
| 155 | } | ||||
| 156 | |||||
| 157 | my %seen; | ||||
| 158 | return sort grep { !$seen{$_}++ } ## no critic | ||||
| 159 | (map{ $_->name } map{ $_->meta->calculate_all_roles } @self_anon_supers), | ||||
| 160 | (map{ $_->name } map{ $_->meta->calculate_all_roles } @other_anon_supers), | ||||
| 161 | ; | ||||
| 162 | } | ||||
| 163 | |||||
| 164 | |||||
| 165 | sub find_method_by_name { | ||||
| 166 | my($self, $method_name) = @_; | ||||
| 167 | defined($method_name) | ||||
| 168 | or $self->throw_error('You must define a method name to find'); | ||||
| 169 | |||||
| 170 | foreach my $class( $self->linearized_isa ){ | ||||
| 171 | my $method = $self->initialize($class)->get_method($method_name); | ||||
| 172 | return $method if defined $method; | ||||
| 173 | } | ||||
| 174 | return undef; | ||||
| 175 | } | ||||
| 176 | |||||
| 177 | sub get_all_methods { | ||||
| 178 | my($self) = @_; | ||||
| 179 | return map{ $self->find_method_by_name($_) } $self->get_all_method_names; | ||||
| 180 | } | ||||
| 181 | |||||
| 182 | sub get_all_method_names { | ||||
| 183 | my $self = shift; | ||||
| 184 | my %uniq; | ||||
| 185 | return grep { $uniq{$_}++ == 0 } | ||||
| 186 | map { Mouse::Meta::Class->initialize($_)->get_method_list() } | ||||
| 187 | $self->linearized_isa; | ||||
| 188 | } | ||||
| 189 | |||||
| 190 | # spent 2.90ms (216µs+2.68) within Mouse::Meta::Class::find_attribute_by_name which was called 7 times, avg 414µs/call:
# 7 times (216µs+2.68ms) by Mouse::Meta::Class::add_attribute at line 223, avg 414µs/call | ||||
| 191 | 7 | 11µs | my($self, $name) = @_; | ||
| 192 | 7 | 8µs | defined($name) | ||
| 193 | or $self->throw_error('You must define an attribute name to find'); | ||||
| 194 | 7 | 204µs | 35 | 5.12ms | foreach my $attr($self->get_all_attributes) { # spent 2.63ms making 7 calls to Mouse::Meta::Class::get_all_attributes, avg 376µs/call
# spent 2.45ms making 7 calls to Mouse::Meta::Class::_calculate_all_attributes, avg 350µs/call
# spent 14µs making 7 calls to Mouse::Meta::Class::strict_constructor, avg 2µs/call
# spent 11µs making 7 calls to Mouse::Meta::Class::is_immutable, avg 2µs/call
# spent 10µs making 7 calls to Mouse::Meta::Class::is_anon_class, avg 1µs/call |
| 195 | 39 | 226µs | 39 | 51µs | return $attr if $attr->name eq $name; # spent 51µs making 39 calls to Mouse::Meta::Attribute::name, avg 1µs/call |
| 196 | } | ||||
| 197 | return undef; | ||||
| 198 | } | ||||
| 199 | |||||
| 200 | # spent 30.7ms (3.44+27.2) within Mouse::Meta::Class::add_attribute which was called 68 times, avg 451µs/call:
# 50 times (2.46ms+19.7ms) by Mouse::has at line 52 of Mouse.pm, avg 443µs/call
# 18 times (983µs+7.54ms) by Mouse::Meta::Role::Application::apply_attributes at line 156 of Mouse/Meta/Role/Application.pm, avg 474µs/call | ||||
| 201 | 68 | 74µs | my $self = shift; | ||
| 202 | |||||
| 203 | 68 | 70µs | my($attr, $name); | ||
| 204 | |||||
| 205 | 68 | 435µs | 68 | 98µs | if(Scalar::Util::blessed($_[0])){ # spent 98µs making 68 calls to Scalar::Util::blessed, avg 1µs/call |
| 206 | $attr = $_[0]; | ||||
| 207 | |||||
| 208 | $attr->isa('Mouse::Meta::Attribute') | ||||
| 209 | || $self->throw_error("Your attribute must be an instance of Mouse::Meta::Attribute (or a subclass)"); | ||||
| 210 | |||||
| 211 | $name = $attr->name; | ||||
| 212 | } | ||||
| 213 | else{ | ||||
| 214 | # _process_attribute | ||||
| 215 | 68 | 80µs | $name = shift; | ||
| 216 | |||||
| 217 | 68 | 305µs | my %args = (@_ == 1) ? %{$_[0]} : @_; | ||
| 218 | |||||
| 219 | 68 | 71µs | defined($name) | ||
| 220 | or $self->throw_error('You must provide a name for the attribute'); | ||||
| 221 | |||||
| 222 | 68 | 444µs | 68 | 104µs | if ($name =~ s/^\+//) { # inherited attributes # spent 104µs making 68 calls to Mouse::Meta::Class::CORE:subst, avg 2µs/call |
| 223 | 7 | 28µs | 7 | 2.90ms | my $inherited_attr = $self->find_attribute_by_name($name) # spent 2.90ms making 7 calls to Mouse::Meta::Class::find_attribute_by_name, avg 414µs/call |
| 224 | or $self->throw_error("Could not find an attribute by the name of '$name' to inherit from in ".$self->name); | ||||
| 225 | |||||
| 226 | 7 | 33µs | 7 | 2.29ms | $attr = $inherited_attr->clone_and_inherit_options(%args); # spent 2.29ms making 7 calls to Mouse::Meta::Attribute::clone_and_inherit_options, avg 328µs/call |
| 227 | } | ||||
| 228 | else{ | ||||
| 229 | 61 | 536µs | 122 | 4.60ms | my($attribute_class, @traits) = $self->attribute_metaclass->interpolate_class(\%args); # spent 4.52ms making 61 calls to Mouse::Meta::Attribute::interpolate_class, avg 74µs/call, recursion: max depth 1, sum of overlapping time 28µs
# spent 103µs making 61 calls to Mouse::Meta::Class::attribute_metaclass, avg 2µs/call |
| 230 | 61 | 76µs | $args{traits} = \@traits if @traits; | ||
| 231 | |||||
| 232 | 61 | 324µs | 61 | 8.46ms | $attr = $attribute_class->new($name, %args); # spent 8.46ms making 61 calls to Mouse::Meta::Attribute::new, avg 139µs/call |
| 233 | } | ||||
| 234 | } | ||||
| 235 | |||||
| 236 | 68 | 391µs | 68 | 128µs | Scalar::Util::weaken( $attr->{associated_class} = $self ); # spent 128µs making 68 calls to Scalar::Util::weaken, avg 2µs/call |
| 237 | |||||
| 238 | # install accessors first | ||||
| 239 | 68 | 254µs | 68 | 9.20ms | $attr->install_accessors(); # spent 9.20ms making 68 calls to Mouse::Meta::Attribute::install_accessors, avg 135µs/call |
| 240 | |||||
| 241 | # then register the attribute to the metaclass | ||||
| 242 | 68 | 121µs | $attr->{insertion_order} = keys %{ $self->{attributes} }; | ||
| 243 | 68 | 97µs | $self->{attributes}{$name} = $attr; | ||
| 244 | 68 | 87µs | delete $self->{_mouse_cache}; # clears internal cache | ||
| 245 | |||||
| 246 | 68 | 82µs | if(!$attr->{associated_methods} && ($attr->{is} || '') ne 'bare'){ | ||
| 247 | Carp::carp(qq{Attribute ($name) of class }.$self->name | ||||
| 248 | .qq{ has no associated methods (did you mean to provide an "is" argument?)}); | ||||
| 249 | } | ||||
| 250 | 68 | 235µs | return $attr; | ||
| 251 | } | ||||
| 252 | |||||
| 253 | # spent 3.42ms (2.48+935µs) within Mouse::Meta::Class::_calculate_all_attributes which was called 16 times, avg 213µs/call:
# 7 times (1.76ms+685µs) by Mouse::Meta::Class::get_all_attributes at line 194, avg 350µs/call
# 3 times (215µs+78µs) by Mouse::Object::new at line 201 of lib/Hailo.pm, avg 97µs/call
# 2 times (68µs+19µs) by Mouse::Meta::Class::_initialize_object at line 83 of Mouse/Meta/Attribute.pm, avg 43µs/call
# once (318µs+114µs) by Mouse::Meta::Class::get_all_attributes at line 174 of MouseX/Getopt/Basic.pm
# once (43µs+15µs) by Mouse::Meta::Class::get_all_attributes at line 69 of Mouse/Meta/Attribute.pm
# once (42µs+14µs) by Mouse::Meta::Class::_initialize_object at line 20 of Mouse/Meta/Role.pm
# once (31µs+10µs) by Mouse::Meta::Class::_initialize_object at line 36 of Mouse/Meta/Role/Application.pm | ||||
| 254 | 16 | 21µs | my($self) = @_; | ||
| 255 | 16 | 16µs | my %seen; | ||
| 256 | 16 | 17µs | my @all_attrs; | ||
| 257 | 16 | 146µs | 16 | 33µs | foreach my $class($self->linearized_isa) { # spent 33µs making 16 calls to Mouse::Meta::Class::linearized_isa, avg 2µs/call |
| 258 | 42 | 163µs | 42 | 125µs | my $meta = Mouse::Util::get_metaclass_by_name($class) or next; # spent 125µs making 42 calls to Mouse::Meta::Module::_get_metaclass_by_name, avg 3µs/call |
| 259 | 377 | 2.32ms | 352 | 471µs | my @attrs = grep { !$seen{$_->name}++ } values %{$meta->{attributes}}; # spent 471µs making 352 calls to Mouse::Meta::Attribute::name, avg 1µs/call |
| 260 | @attrs = sort { | ||||
| 261 | 25 | 397µs | 25 | 306µs | $b->{insertion_order} <=> $a->{insertion_order} # spent 306µs making 25 calls to Mouse::Meta::Class::CORE:sort, avg 12µs/call |
| 262 | } @attrs; | ||||
| 263 | 25 | 83µs | push @all_attrs, @attrs; | ||
| 264 | } | ||||
| 265 | 16 | 113µs | return [reverse @all_attrs]; | ||
| 266 | } | ||||
| 267 | |||||
| 268 | sub linearized_isa; | ||||
| 269 | |||||
| 270 | sub new_object; | ||||
| 271 | sub clone_object; | ||||
| 272 | |||||
| 273 | # spent 41µs within Mouse::Meta::Class::immutable_options which was called 7 times, avg 6µs/call:
# 7 times (41µs+0s) by Mouse::Meta::Class::make_immutable at line 286, avg 6µs/call | ||||
| 274 | 7 | 13µs | my ( $self, @args ) = @_; | ||
| 275 | |||||
| 276 | return ( | ||||
| 277 | 7 | 38µs | inline_constructor => 1, | ||
| 278 | inline_destructor => 1, | ||||
| 279 | constructor_name => 'new', | ||||
| 280 | @args, | ||||
| 281 | ); | ||||
| 282 | } | ||||
| 283 | |||||
| 284 | # spent 837µs (335+502) within Mouse::Meta::Class::make_immutable which was called 7 times, avg 120µs/call:
# once (65µs+77µs) by Mouse::Util::_try_load_one_class at line 343 of lib/Hailo.pm
# once (49µs+75µs) by Mouse::Util::_try_load_one_class at line 265 of lib/Hailo/Storage.pm
# once (49µs+70µs) by Hailo::_new_class at line 312 of lib/Hailo/Engine/Default.pm
# once (46µs+72µs) by Hailo::_new_class at line 202 of lib/Hailo/Tokenizer/Words.pm
# once (44µs+70µs) by Hailo::_new_class at line 127 of lib/Hailo/Storage/SQLite.pm
# once (42µs+68µs) by hailo::BEGIN@8 at line 405 of lib/Hailo/Command.pm
# once (41µs+69µs) by main::RUNTIME at line 12 of bin/hailo | ||||
| 285 | 7 | 10µs | my $self = shift; | ||
| 286 | 7 | 53µs | 7 | 41µs | my %args = $self->immutable_options(@_); # spent 41µs making 7 calls to Mouse::Meta::Class::immutable_options, avg 6µs/call |
| 287 | |||||
| 288 | 7 | 14µs | $self->{is_immutable}++; | ||
| 289 | |||||
| 290 | 7 | 173µs | 28 | 195µs | if ($args{inline_constructor}) { # spent 192µs making 7 calls to Mouse::Util::load_class, avg 27µs/call, recursion: max depth 1, sum of overlapping time 62µs
# spent 42µs making 7 calls to Mouse::Meta::Module::add_method, avg 6µs/call
# spent 13µs making 7 calls to Mouse::Meta::Class::constructor_class, avg 2µs/call
# spent 11µs making 7 calls to Mouse::Meta::Method::Constructor::XS::_generate_constructor, avg 2µs/call |
| 291 | $self->add_method($args{constructor_name} => | ||||
| 292 | Mouse::Util::load_class($self->constructor_class) | ||||
| 293 | ->_generate_constructor($self, \%args)); | ||||
| 294 | } | ||||
| 295 | |||||
| 296 | 7 | 154µs | 28 | 160µs | if ($args{inline_destructor}) { # spent 153µs making 7 calls to Mouse::Util::load_class, avg 22µs/call, recursion: max depth 1, sum of overlapping time 44µs
# spent 31µs making 7 calls to Mouse::Meta::Module::add_method, avg 4µs/call
# spent 10µs making 7 calls to Mouse::Meta::Class::destructor_class, avg 1µs/call
# spent 10µs making 7 calls to Mouse::Meta::Method::Destructor::XS::_generate_destructor, avg 1µs/call |
| 297 | $self->add_method(DESTROY => | ||||
| 298 | Mouse::Util::load_class($self->destructor_class) | ||||
| 299 | ->_generate_destructor($self, \%args)); | ||||
| 300 | } | ||||
| 301 | |||||
| 302 | # Moose's make_immutable returns true allowing calling code to skip | ||||
| 303 | # setting an explicit true value at the end of a source file. | ||||
| 304 | 7 | 35µs | return 1; | ||
| 305 | } | ||||
| 306 | |||||
| 307 | sub make_mutable { | ||||
| 308 | my($self) = @_; | ||||
| 309 | $self->{is_immutable} = 0; | ||||
| 310 | return; | ||||
| 311 | } | ||||
| 312 | |||||
| 313 | sub is_immutable; | ||||
| 314 | sub is_mutable { !$_[0]->is_immutable } | ||||
| 315 | |||||
| 316 | # spent 450µs (351+99) within Mouse::Meta::Class::_install_modifier which was called 9 times, avg 50µs/call:
# 4 times (195µs+42µs) by Mouse::Meta::Class::add_around_method_modifier at line 392, avg 59µs/call
# 4 times (124µs+47µs) by Mouse::Meta::Class::add_before_method_modifier at line 387, avg 43µs/call
# once (31µs+10µs) by Mouse::Meta::Class::add_after_method_modifier at line 397 | ||||
| 317 | 9 | 14µs | my( $self, $type, $name, $code ) = @_; | ||
| 318 | 9 | 48µs | 9 | 12µs | my $into = $self->name; # spent 12µs making 9 calls to Mouse::Meta::Module::name, avg 1µs/call |
| 319 | |||||
| 320 | 9 | 67µs | 9 | 28µs | my $original = $into->can($name) # spent 28µs making 9 calls to UNIVERSAL::can, avg 3µs/call |
| 321 | or $self->throw_error("The method '$name' was not found in the inheritance hierarchy for $into"); | ||||
| 322 | |||||
| 323 | 9 | 15µs | my $modifier_table = $self->{modifiers}{$name}; | ||
| 324 | |||||
| 325 | 9 | 20µs | if(!$modifier_table){ | ||
| 326 | 9 | 13µs | my(@before, @after, @around); | ||
| 327 | 9 | 10µs | my $cache = $original; | ||
| 328 | # spent 104s (412ms+103) within Hailo::Command::train_progress which was called 2 times, avg 51.8s/call:
# once (21µs+51.8s) by Hailo::Command::__ANON__[lib/Hailo/Command.pm:298] at line 293 of lib/Hailo/Command.pm
# once (412ms+51.4s) by Hailo::Command::train_progress at line 332
# spent 53.0ms (19µs+53.0) within Hailo::Storage::SQLite::start_training which was called:
# once (19µs+53.0ms) by Hailo::train at line 213 of lib/Hailo.pm
# spent 4.47ms (41µs+4.43) within Hailo::Storage::SQLite::stop_training which was called:
# once (41µs+4.43ms) by Hailo::train at line 240 of lib/Hailo.pm
# spent 104s (107µs+104) within Hailo::Command::run which was called 2 times, avg 51.9s/call:
# once (22µs+51.9s) by main::RUNTIME at line 35 of bin/hailo
# once (86µs+51.9s) by Hailo::Command::run at line 332
# spent 3.76ms (167µs+3.59) within Hailo::Command::_get_cmd_flags_for_attr which was called 22 times, avg 171µs/call:
# 22 times (167µs+3.59ms) by MouseX::Getopt::Basic::_attrs_to_options at line 200 of MouseX/Getopt/Basic.pm, avg 171µs/call
# spent 282µs (9+274) within Hailo::Command::_getopt_spec which was called:
# once (9µs+274µs) by MouseX::Getopt::Basic::_parse_argv at line 93 of MouseX/Getopt/Basic.pm
# spent 5.51ms (18µs+5.49) within Hailo::Storage::SQLite::_engage which was called:
# once (18µs+5.49ms) by Hailo::Storage::start_training at line 202 of lib/Hailo/Storage.pm
# spent 48.2ms (11µs+48.2) within Hailo::Command::_getopt_get_options which was called:
# once (11µs+48.2ms) by MouseX::Getopt::Basic::_parse_argv at line 102 of MouseX/Getopt/Basic.pm
# spent 176µs (9+167) within Hailo::Storage::SQLite::_build_dbi_options which was called:
# once (9µs+167µs) by Hailo::Storage::dbi_options at line 39 of lib/Hailo/Storage.pm | ||||
| 329 | 30 | 42µs | if(@before) { | ||
| 330 | 4 | 25µs | 4 | 105ms | for my $c (@before) { $c->(@_) } # spent 47.4ms making 1 call to Hailo::Storage::SQLite::__ANON__[lib/Hailo/Storage/SQLite.pm:66]
# spent 47.3ms making 1 call to Hailo::Command::__ANON__[lib/Hailo/Command.pm:234]
# spent 9.75ms making 1 call to Hailo::Command::__ANON__[lib/Hailo/Command.pm:307]
# spent 313µs making 1 call to Hailo::Storage::SQLite::__ANON__[lib/Hailo/Storage/SQLite.pm:59] |
| 331 | } | ||||
| 332 | 30 | 224µs | 30 | 104s | unless(@after) { # spent 51.9s making 1 call to Hailo::Command::run
# spent 51.8s making 1 call to Hailo::Command::train_progress
# spent 52.3ms making 25 calls to Mouse::Meta::Class::__ANON__[Mouse/Meta/Class.pm:379], avg 2.09ms/call
# spent 5.61ms making 1 call to Hailo::Storage::start_training
# spent 5.18ms making 1 call to Hailo::Storage::_engage
# spent 40µs making 1 call to Term::Sk::DESTROY |
| 333 | return $cache->(@_); | ||||
| 334 | } | ||||
| 335 | |||||
| 336 | 1 | 1µs | if(wantarray){ # list context | ||
| 337 | my @rval = $cache->(@_); | ||||
| 338 | |||||
| 339 | for my $c(@after){ $c->(@_) } | ||||
| 340 | return @rval; | ||||
| 341 | } | ||||
| 342 | elsif(defined wantarray){ # scalar context | ||||
| 343 | my $rval = $cache->(@_); | ||||
| 344 | |||||
| 345 | for my $c(@after){ $c->(@_) } | ||||
| 346 | return $rval; | ||||
| 347 | } | ||||
| 348 | else{ # void context | ||||
| 349 | 1 | 5µs | 1 | 4.07ms | $cache->(@_); # spent 4.07ms making 1 call to Hailo::Storage::stop_training |
| 350 | |||||
| 351 | 2 | 23µs | 1 | 360µs | for my $c(@after){ $c->(@_) } # spent 360µs making 1 call to Hailo::Storage::SQLite::__ANON__[lib/Hailo/Storage/SQLite.pm:73] |
| 352 | 1 | 6µs | return; | ||
| 353 | } | ||||
| 354 | 9 | 34µs | }; | ||
| 355 | |||||
| 356 | 9 | 43µs | $self->{modifiers}{$name} = $modifier_table = { | ||
| 357 | original => $original, | ||||
| 358 | |||||
| 359 | before => \@before, | ||||
| 360 | after => \@after, | ||||
| 361 | around => \@around, | ||||
| 362 | |||||
| 363 | cache => \$cache, # cache for around modifiers | ||||
| 364 | }; | ||||
| 365 | |||||
| 366 | 9 | 108µs | 9 | 58µs | $self->add_method($name => $modified); # spent 58µs making 9 calls to Mouse::Meta::Module::add_method, avg 6µs/call |
| 367 | } | ||||
| 368 | |||||
| 369 | 9 | 21µs | if($type eq 'before'){ | ||
| 370 | unshift @{$modifier_table->{before}}, $code; | ||||
| 371 | } | ||||
| 372 | elsif($type eq 'after'){ | ||||
| 373 | push @{$modifier_table->{after}}, $code; | ||||
| 374 | } | ||||
| 375 | else{ # around | ||||
| 376 | 4 | 7µs | push @{$modifier_table->{around}}, $code; | ||
| 377 | |||||
| 378 | 4 | 6µs | my $next = ${ $modifier_table->{cache} }; | ||
| 379 | 29 | 180µs | 25 | 52.1ms | # spent 52.3ms (184µs+52.1) within Mouse::Meta::Class::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux/Mouse/Meta/Class.pm:379] which was called 25 times, avg 2.09ms/call:
# 25 times (184µs+52.1ms) by Hailo::Command::_get_cmd_flags_for_attr or Hailo::Command::_getopt_get_options or Hailo::Command::_getopt_spec or Hailo::Storage::SQLite::_build_dbi_options at line 332, avg 2.09ms/call # spent 48.2ms making 1 call to MouseX::Getopt::GLD::__ANON__[MouseX/Getopt/GLD.pm:39]
# spent 3.43ms making 22 calls to MouseX::Getopt::Dashes::__ANON__[MouseX/Getopt/Dashes.pm:24], avg 156µs/call
# spent 266µs making 1 call to MouseX::Getopt::GLD::__ANON__[MouseX/Getopt/GLD.pm:33]
# spent 160µs making 1 call to Hailo::Storage::SQLite::__ANON__[lib/Hailo/Storage/SQLite.pm:36] |
| 380 | } | ||||
| 381 | |||||
| 382 | 9 | 38µs | return; | ||
| 383 | } | ||||
| 384 | |||||
| 385 | # spent 205µs (34+170) within Mouse::Meta::Class::add_before_method_modifier which was called 4 times, avg 51µs/call:
# 4 times (34µs+170µs) by Mouse::before at line 61 of Mouse.pm, avg 51µs/call | ||||
| 386 | 4 | 7µs | my ( $self, $name, $code ) = @_; | ||
| 387 | 4 | 25µs | 4 | 170µs | $self->_install_modifier( 'before', $name, $code ); # spent 170µs making 4 calls to Mouse::Meta::Class::_install_modifier, avg 43µs/call |
| 388 | } | ||||
| 389 | |||||
| 390 | # spent 275µs (37+238) within Mouse::Meta::Class::add_around_method_modifier which was called 4 times, avg 69µs/call:
# 3 times (27µs+175µs) by Mouse::Meta::Role::Application::apply_modifiers at line 182 of Mouse/Meta/Role/Application.pm, avg 67µs/call
# once (10µs+63µs) by Mouse::around at line 79 of Mouse.pm | ||||
| 391 | 4 | 7µs | my ( $self, $name, $code ) = @_; | ||
| 392 | 4 | 29µs | 4 | 238µs | $self->_install_modifier( 'around', $name, $code ); # spent 238µs making 4 calls to Mouse::Meta::Class::_install_modifier, avg 59µs/call |
| 393 | } | ||||
| 394 | |||||
| 395 | # spent 51µs (9+41) within Mouse::Meta::Class::add_after_method_modifier which was called:
# once (9µs+41µs) by Mouse::after at line 70 of Mouse.pm | ||||
| 396 | 1 | 2µs | my ( $self, $name, $code ) = @_; | ||
| 397 | 1 | 7µs | 1 | 41µs | $self->_install_modifier( 'after', $name, $code ); # spent 41µs making 1 call to Mouse::Meta::Class::_install_modifier |
| 398 | } | ||||
| 399 | |||||
| 400 | # spent 170µs (75+95) within Mouse::Meta::Class::add_override_method_modifier which was called 3 times, avg 57µs/call:
# 3 times (75µs+95µs) by Mouse::override at line 98 of Mouse.pm, avg 57µs/call | ||||
| 401 | 3 | 6µs | my ($self, $name, $code) = @_; | ||
| 402 | |||||
| 403 | 3 | 11µs | 3 | 58µs | if($self->has_method($name)){ # spent 58µs making 3 calls to Mouse::Meta::Module::has_method, avg 19µs/call |
| 404 | $self->throw_error("Cannot add an override method if a local method is already present"); | ||||
| 405 | } | ||||
| 406 | |||||
| 407 | 3 | 17µs | 3 | 5µs | my $package = $self->name; # spent 5µs making 3 calls to Mouse::Meta::Module::name, avg 2µs/call |
| 408 | |||||
| 409 | 3 | 23µs | 3 | 10µs | my $super_body = $package->can($name) # spent 10µs making 3 calls to UNIVERSAL::can, avg 3µs/call |
| 410 | or $self->throw_error("You cannot override '$name' because it has no super method"); | ||||
| 411 | |||||
| 412 | # spent 316µs (14+302) within Hailo::Storage::SQLite::initialized which was called:
# once (14µs+302µs) by Hailo::Storage::_engage at line 96 of lib/Hailo/Storage.pm
# spent 38µs (13+25) within Hailo::Storage::SQLite::_build_dbd_options which was called:
# once (13µs+25µs) by Hailo::Storage::dbd_options at line 55 of lib/Hailo/Storage.pm
# spent 51.8s (15µs+51.8) within Hailo::Command::_train_fh which was called:
# once (15µs+51.8s) by Hailo::train at line 228 of lib/Hailo.pm | ||||
| 413 | 3 | 6µs | local $Mouse::SUPER_PACKAGE = $package; | ||
| 414 | 3 | 4µs | local $Mouse::SUPER_BODY = $super_body; | ||
| 415 | 3 | 7µs | local @Mouse::SUPER_ARGS = @_; | ||
| 416 | 3 | 31µs | 3 | 51.8s | &{$code}; # spent 51.8s making 1 call to Hailo::Command::__ANON__[lib/Hailo/Command.pm:298]
# spent 302µs making 1 call to Hailo::Storage::SQLite::__ANON__[lib/Hailo/Storage/SQLite.pm:82]
# spent 25µs making 1 call to Hailo::Storage::SQLite::__ANON__[lib/Hailo/Storage/SQLite.pm:18] |
| 417 | 3 | 42µs | 3 | 22µs | }); # spent 22µs making 3 calls to Mouse::Meta::Module::add_method, avg 7µs/call |
| 418 | 3 | 12µs | return; | ||
| 419 | } | ||||
| 420 | |||||
| 421 | sub add_augment_method_modifier { | ||||
| 422 | my ($self, $name, $code) = @_; | ||||
| 423 | if($self->has_method($name)){ | ||||
| 424 | $self->throw_error("Cannot add an augment method if a local method is already present"); | ||||
| 425 | } | ||||
| 426 | |||||
| 427 | my $super = $self->find_method_by_name($name) | ||||
| 428 | or $self->throw_error("You cannot augment '$name' because it has no super method"); | ||||
| 429 | |||||
| 430 | my $super_package = $super->package_name; | ||||
| 431 | my $super_body = $super->body; | ||||
| 432 | |||||
| 433 | $self->add_method($name => sub { | ||||
| 434 | local $Mouse::INNER_BODY{$super_package} = $code; | ||||
| 435 | local $Mouse::INNER_ARGS{$super_package} = [@_]; | ||||
| 436 | &{$super_body}; | ||||
| 437 | }); | ||||
| 438 | return; | ||||
| 439 | } | ||||
| 440 | |||||
| 441 | # spent 4.51ms (2.39+2.11) within Mouse::Meta::Class::does_role which was called 97 times, avg 46µs/call:
# 81 times (1.88ms+1.59ms) by Mouse::Util::does_role at line 125 of Mouse/Util.pm, avg 43µs/call
# 15 times (467µs+411µs) by Mouse::Meta::Role::Application::_append_roles at line 194 of Mouse/Meta/Role/Application.pm, avg 59µs/call
# once (51µs+109µs) by MouseX::Getopt::Basic::new_with_options at line 26 of MouseX/Getopt/Basic.pm | ||||
| 442 | 97 | 130µs | my ($self, $role_name) = @_; | ||
| 443 | |||||
| 444 | 97 | 100µs | (defined $role_name) | ||
| 445 | || $self->throw_error("You must supply a role name to look for"); | ||||
| 446 | |||||
| 447 | 97 | 157µs | 15 | 21µs | $role_name = $role_name->name if ref $role_name; # spent 21µs making 15 calls to Mouse::Meta::Module::name, avg 1µs/call |
| 448 | |||||
| 449 | 97 | 655µs | 97 | 220µs | for my $class ($self->linearized_isa) { # spent 220µs making 97 calls to Mouse::Meta::Class::linearized_isa, avg 2µs/call |
| 450 | 126 | 463µs | 126 | 355µs | my $meta = Mouse::Util::get_metaclass_by_name($class) # spent 355µs making 126 calls to Mouse::Meta::Module::_get_metaclass_by_name, avg 3µs/call |
| 451 | or next; | ||||
| 452 | |||||
| 453 | 100 | 575µs | 100 | 145µs | for my $role (@{ $meta->roles }) { # spent 145µs making 100 calls to Mouse::Meta::Class::roles, avg 1µs/call |
| 454 | |||||
| 455 | 89 | 519µs | 89 | 1.37ms | return 1 if $role->does_role($role_name); # spent 1.37ms making 89 calls to Mouse::Meta::Role::does_role, avg 15µs/call |
| 456 | } | ||||
| 457 | } | ||||
| 458 | |||||
| 459 | 26 | 88µs | return 0; | ||
| 460 | } | ||||
| 461 | |||||
| 462 | 1 | 4µs | 1; | ||
| 463 | __END__ | ||||
# spent 306µs within Mouse::Meta::Class::CORE:sort which was called 25 times, avg 12µs/call:
# 25 times (306µs+0s) by Mouse::Meta::Class::_calculate_all_attributes at line 261, avg 12µs/call | |||||
# spent 104µs within Mouse::Meta::Class::CORE:subst which was called 68 times, avg 2µs/call:
# 68 times (104µs+0s) by Mouse::Meta::Class::add_attribute at line 222, avg 2µs/call | |||||
# spent 1.13ms (308µs+820µs) within Mouse::Meta::Class::_initialize_object which was called 34 times, avg 33µs/call:
# 28 times (235µs+710µs) by Mouse::Meta::Attribute::new at line 83 of Mouse/Meta/Attribute.pm, avg 34µs/call
# 3 times (42µs+63µs) by Mouse::Meta::Role::_construct_meta at line 20 of Mouse/Meta/Role.pm, avg 35µs/call
# 3 times (31µs+47µs) by Mouse::Meta::Role::Application::new at line 36 of Mouse/Meta/Role/Application.pm, avg 26µs/call | |||||
# spent 103µs within Mouse::Meta::Class::attribute_metaclass which was called 61 times, avg 2µs/call:
# 61 times (103µs+0s) by Mouse::Meta::Class::add_attribute at line 229, avg 2µs/call | |||||
# spent 13µs within Mouse::Meta::Class::constructor_class which was called 7 times, avg 2µs/call:
# 7 times (13µs+0s) by Mouse::Meta::Class::make_immutable at line 290, avg 2µs/call | |||||
# spent 10µs within Mouse::Meta::Class::destructor_class which was called 7 times, avg 1µs/call:
# 7 times (10µs+0s) by Mouse::Meta::Class::make_immutable at line 296, avg 1µs/call | |||||
# spent 3.22ms (236µs+2.98) within Mouse::Meta::Class::get_all_attributes which was called 26 times, avg 124µs/call:
# 18 times (56µs+64µs) by Mouse::Meta::Attribute::new at line 69 of Mouse/Meta/Attribute.pm, avg 7µs/call
# 7 times (150µs+2.48ms) by Mouse::Meta::Class::find_attribute_by_name at line 194, avg 376µs/call
# once (31µs+437µs) by MouseX::Getopt::Basic::_compute_getopt_attrs at line 174 of MouseX/Getopt/Basic.pm | |||||
# spent 23µs within Mouse::Meta::Class::is_anon_class which was called 16 times, avg 1µs/call:
# 7 times (10µs+0s) by Mouse::Meta::Class::get_all_attributes at line 194, avg 1µs/call
# 3 times (4µs+0s) by Mouse::Object::new at line 201 of lib/Hailo.pm, avg 1µs/call
# 2 times (3µs+0s) by Mouse::Meta::Class::_initialize_object at line 83 of Mouse/Meta/Attribute.pm, avg 1µs/call
# once (2µs+0s) by Mouse::Meta::Class::get_all_attributes at line 69 of Mouse/Meta/Attribute.pm
# once (1µs+0s) by Mouse::Meta::Class::_initialize_object at line 20 of Mouse/Meta/Role.pm
# once (1µs+0s) by Mouse::Meta::Class::get_all_attributes at line 174 of MouseX/Getopt/Basic.pm
# once (1µs+0s) by Mouse::Meta::Class::_initialize_object at line 36 of Mouse/Meta/Role/Application.pm | |||||
# spent 26µs within Mouse::Meta::Class::is_immutable which was called 16 times, avg 2µs/call:
# 7 times (11µs+0s) by Mouse::Meta::Class::get_all_attributes at line 194, avg 2µs/call
# 3 times (5µs+0s) by Mouse::Object::new at line 201 of lib/Hailo.pm, avg 2µs/call
# 2 times (3µs+0s) by Mouse::Meta::Class::_initialize_object at line 83 of Mouse/Meta/Attribute.pm, avg 2µs/call
# once (2µs+0s) by Mouse::Meta::Class::_initialize_object at line 20 of Mouse/Meta/Role.pm
# once (2µs+0s) by Mouse::Meta::Class::_initialize_object at line 36 of Mouse/Meta/Role/Application.pm
# once (2µs+0s) by Mouse::Meta::Class::get_all_attributes at line 174 of MouseX/Getopt/Basic.pm
# once (2µs+0s) by Mouse::Meta::Class::get_all_attributes at line 69 of Mouse/Meta/Attribute.pm | |||||
sub Mouse::Meta::Class::linearized_isa; # xsub | |||||
# spent 145µs within Mouse::Meta::Class::roles which was called 100 times, avg 1µs/call:
# 100 times (145µs+0s) by Mouse::Meta::Class::does_role at line 453, avg 1µs/call | |||||
# spent 59µs within Mouse::Meta::Class::strict_constructor which was called 21 times, avg 3µs/call:
# 7 times (14µs+0s) by Mouse::Meta::Class::get_all_attributes at line 194, avg 2µs/call
# 5 times (17µs+0s) by MouseX::StrictConstructor::init_meta at line 14 of MouseX/StrictConstructor.pm, avg 3µs/call
# 3 times (7µs+0s) by Mouse::Object::new at line 201 of lib/Hailo.pm, avg 2µs/call
# 2 times (10µs+0s) by Mouse::Meta::Class::_initialize_object at line 83 of Mouse/Meta/Attribute.pm, avg 5µs/call
# once (3µs+0s) by Mouse::Meta::Class::get_all_attributes at line 69 of Mouse/Meta/Attribute.pm
# once (3µs+0s) by Mouse::Meta::Class::_initialize_object at line 20 of Mouse/Meta/Role.pm
# once (3µs+0s) by Mouse::Meta::Class::_initialize_object at line 36 of Mouse/Meta/Role/Application.pm
# once (2µs+0s) by Mouse::Meta::Class::get_all_attributes at line 174 of MouseX/Getopt/Basic.pm |