Profile of Moose/Meta/Role/Application.pm

← Index
NYTProf Performance Profile «line view»
For script/ponapi
Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:11 2016

Filename | /usr/local/lib/perl/5.18.2/Moose/Meta/Role/Application.pm
Statements | Executed 3850 statements in 9.14ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
61 | 1 | 1 | 5.14ms | 7.29ms | Moose::Meta::Role::Application::::apply_before_method_modifiersMoose::Meta::Role::Application::apply_before_method_modifiers
61 | 3 | 3 | 1.68ms | 426ms | Moose::Meta::Role::Application::::applyMoose::Meta::Role::Application::apply (recurses: max depth 1, inclusive time 28.6ms)
519 | 2 | 2 | 1.56ms | 2.01ms | Moose::Meta::Role::Application::::is_method_excludedMoose::Meta::Role::Application::is_method_excluded
514 | 2 | 2 | 1.43ms | 1.90ms | Moose::Meta::Role::Application::::is_method_aliasedMoose::Meta::Role::Application::is_method_aliased
61 | 2 | 2 | 291µs | 1.46ms | Moose::Meta::Role::Application::::newMoose::Meta::Role::Application::new
61 | 1 | 1 | 180µs | 5.61ms | Moose::Meta::Role::Application::::apply_around_method_modifiersMoose::Meta::Role::Application::apply_around_method_modifiers
61 | 1 | 1 | 168µs | 1.05ms | Moose::Meta::Role::Application::::apply_after_method_modifiersMoose::Meta::Role::Application::apply_after_method_modifiers
42 | 1 | 1 | 154µs | 1.43ms | Moose::Meta::Role::Application::::apply_overloadingMoose::Meta::Role::Application::apply_overloading
22 | 1 | 1 | 99µs | 126µs | Moose::Meta::Role::Application::::is_aliased_methodMoose::Meta::Role::Application::is_aliased_method
61 | 2 | 1 | 88µs | 88µs | Moose::Meta::Role::Application::::__ANON__[:23]Moose::Meta::Role::Application::__ANON__[:23]
61 | 2 | 1 | 79µs | 79µs | Moose::Meta::Role::Application::::__ANON__[:16]Moose::Meta::Role::Application::__ANON__[:16]
1 | 1 | 1 | 16µs | 68µs | Moose::Meta::Role::Application::::BEGIN@9Moose::Meta::Role::Application::BEGIN@9
1 | 1 | 1 | 10µs | 23µs | Moose::Meta::Role::Application::::BEGIN@4Moose::Meta::Role::Application::BEGIN@4
1 | 1 | 1 | 8µs | 3.76ms | Moose::Meta::Role::Application::::BEGIN@6Moose::Meta::Role::Application::BEGIN@6
1 | 1 | 1 | 7µs | 163µs | Moose::Meta::Role::Application::::BEGIN@11Moose::Meta::Role::Application::BEGIN@11
1 | 1 | 1 | 7µs | 12µs | Moose::Meta::Role::Application::::BEGIN@5Moose::Meta::Role::Application::BEGIN@5
1 | 1 | 1 | 5µs | 5µs | Moose::Meta::Role::Application::::BEGIN@7Moose::Meta::Role::Application::BEGIN@7
0 | 0 | 0 | 0s | 0s | Moose::Meta::Role::Application::::apply_attributesMoose::Meta::Role::Application::apply_attributes
0 | 0 | 0 | 0s | 0s | Moose::Meta::Role::Application::::apply_method_modifiersMoose::Meta::Role::Application::apply_method_modifiers
0 | 0 | 0 | 0s | 0s | Moose::Meta::Role::Application::::apply_methodsMoose::Meta::Role::Application::apply_methods
0 | 0 | 0 | 0s | 0s | Moose::Meta::Role::Application::::apply_override_method_modifiersMoose::Meta::Role::Application::apply_override_method_modifiers
0 | 0 | 0 | 0s | 0s | Moose::Meta::Role::Application::::check_required_attributesMoose::Meta::Role::Application::check_required_attributes
0 | 0 | 0 | 0s | 0s | Moose::Meta::Role::Application::::check_required_methodsMoose::Meta::Role::Application::check_required_methods
0 | 0 | 0 | 0s | 0s | Moose::Meta::Role::Application::::check_role_exclusionsMoose::Meta::Role::Application::check_role_exclusions

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package Moose::Meta::Role::Application;
2 | 1 | 700ns |  |  | our $VERSION = '2.1604';
3 |  |  |  |  |
4 | 2 | 22µs | 2 | 35µs | # spent 23µs (10+12) within Moose::Meta::Role::Application::BEGIN@4 which was called: # once (10µs+12µs) by Moose::BEGIN@34 at line 4 use strict; # spent 23µs making 1 call to Moose::Meta::Role::Application::BEGIN@4 # spent 12µs making 1 call to strict::import
5 | 2 | 18µs | 2 | 16µs | # spent 12µs (7+5) within Moose::Meta::Role::Application::BEGIN@5 which was called: # once (7µs+5µs) by Moose::BEGIN@34 at line 5 use warnings; # spent 12µs making 1 call to Moose::Meta::Role::Application::BEGIN@5 # spent 5µs making 1 call to warnings::import
6 | 2 | 30µs | 2 | 7.51ms | # spent 3.76ms (8µs+3.75) within Moose::Meta::Role::Application::BEGIN@6 which was called: # once (8µs+3.75ms) by Moose::BEGIN@34 at line 6 use metaclass; # spent 3.76ms making 1 call to Moose::Meta::Role::Application::BEGIN@6 # spent 3.75ms making 1 call to metaclass::import
7 | 2 | 28µs | 1 | 5µs | # spent 5µs within Moose::Meta::Role::Application::BEGIN@7 which was called: # once (5µs+0s) by Moose::BEGIN@34 at line 7 use overload (); # spent 5µs making 1 call to Moose::Meta::Role::Application::BEGIN@7
8 |  |  |  |  |
9 | 3 | 46µs | 3 | 92µs | # spent 68µs (16+53) within Moose::Meta::Role::Application::BEGIN@9 which was called: # once (16µs+53µs) by Moose::BEGIN@34 at line 9 use List::Util 1.33 qw( all ); # spent 68µs making 1 call to Moose::Meta::Role::Application::BEGIN@9 # spent 15µs making 1 call to UNIVERSAL::VERSION # spent 9µs making 1 call to List::Util::import
10 |  |  |  |  |
11 | 2 | 501µs | 2 | 319µs | # spent 163µs (7+156) within Moose::Meta::Role::Application::BEGIN@11 which was called: # once (7µs+156µs) by Moose::BEGIN@34 at line 11 use Moose::Util 'throw_exception'; # spent 163µs making 1 call to Moose::Meta::Role::Application::BEGIN@11 # spent 156µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337]
12 |  |  |  |  |
13 |  |  |  |  | __PACKAGE__->meta->add_attribute('method_exclusions' => (
14 |  |  |  |  | init_arg => '-excludes',
15 |  |  |  |  | reader => 'get_method_exclusions',
16 | 61 | 139µs |  |  | # spent 79µs within Moose::Meta::Role::Application::__ANON__[/usr/local/lib/perl/5.18.2/Moose/Meta/Role/Application.pm:16] which was called 61 times, avg 1µs/call: # 33 times (45µs+0s) by Moose::Meta::Role::Application::RoleSummation::_new or Moose::Meta::Role::Application::ToRole::_new at line 21 of (eval 45)[Eval/Closure.pm:144], avg 1µs/call # 28 times (34µs+0s) by Moose::Meta::Role::Application::ToClass::_new at line 24 of (eval 45)[Eval/Closure.pm:144], avg 1µs/call default => sub { [] },
17 | 1 | 21µs | 3 | 377µs | Class::MOP::_definition_context(), # spent 347µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute # spent 24µs making 1 call to Moose::Meta::Role::Application::meta # spent 5µs making 1 call to Class::MOP::_definition_context
18 |  |  |  |  | ));
19 |  |  |  |  |
20 |  |  |  |  | __PACKAGE__->meta->add_attribute('method_aliases' => (
21 |  |  |  |  | init_arg => '-alias',
22 |  |  |  |  | reader => 'get_method_aliases',
23 | 61 | 148µs |  |  | # spent 88µs within Moose::Meta::Role::Application::__ANON__[/usr/local/lib/perl/5.18.2/Moose/Meta/Role/Application.pm:23] which was called 61 times, avg 1µs/call: # 33 times (51µs+0s) by Moose::Meta::Role::Application::RoleSummation::_new or Moose::Meta::Role::Application::ToRole::_new at line 15 of (eval 45)[Eval/Closure.pm:144], avg 2µs/call # 28 times (37µs+0s) by Moose::Meta::Role::Application::ToClass::_new at line 18 of (eval 45)[Eval/Closure.pm:144], avg 1µs/call default => sub { {} },
24 | 1 | 4µs | 3 | 258µs | Class::MOP::_definition_context(), # spent 246µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute # spent 8µs making 1 call to Moose::Meta::Role::Application::meta # spent 4µs making 1 call to Class::MOP::_definition_context
25 |  |  |  |  | ));
26 |  |  |  |  |
27 |  |  |  |  | # spent 1.46ms (291µs+1.17) within Moose::Meta::Role::Application::new which was called 61 times, avg 24µs/call: # 42 times (191µs+779µs) by Moose::Meta::Role::apply at line 472 of Moose/Meta/Role.pm, avg 23µs/call # 19 times (100µs+389µs) by Moose::Meta::Role::Composite::apply_params at line 178 of Moose/Meta/Role/Composite.pm, avg 26µs/call sub new {
28 | 61 | 49µs |  |  | my ($class, %params) = @_;
29 | 61 | 263µs | 61 | 1.17ms | $class->_new(\%params); # spent 529µs making 28 calls to Moose::Meta::Role::Application::ToClass::_new, avg 19µs/call # spent 389µs making 19 calls to Moose::Meta::Role::Application::RoleSummation::_new, avg 20µs/call # spent 250µs making 14 calls to Moose::Meta::Role::Application::ToRole::_new, avg 18µs/call
30 |  |  |  |  | }
31 |  |  |  |  |
32 |  |  |  |  | # spent 2.01ms (1.56+455µs) within Moose::Meta::Role::Application::is_method_excluded which was called 519 times, avg 4µs/call: # 290 times (898µs+263µs) by Moose::Meta::Role::Application::ToClass::apply_methods at line 141 of Moose/Meta/Role/Application/ToClass.pm, avg 4µs/call # 229 times (661µs+192µs) by Moose::Meta::Role::Application::ToRole::apply_methods at line 83 of Moose/Meta/Role/Application/ToRole.pm, avg 4µs/call sub is_method_excluded {
33 | 519 | 124µs |  |  | my ($self, $method_name) = @_;
34 | 519 | 572µs | 519 | 455µs | foreach (@{$self->get_method_exclusions}) { # spent 455µs making 519 calls to Moose::Meta::Role::Application::get_method_exclusions, avg 877ns/call
35 |  |  |  |  | return 1 if $_ eq $method_name;
36 |  |  |  |  | }
37 | 519 | 3.87ms |  |  | return 0;
38 |  |  |  |  | }
39 |  |  |  |  |
40 |  |  |  |  | # spent 1.90ms (1.43+471µs) within Moose::Meta::Role::Application::is_method_aliased which was called 514 times, avg 4µs/call: # 285 times (804µs+282µs) by Moose::Meta::Role::Application::ToClass::apply_methods at line 153 of Moose/Meta/Role/Application/ToClass.pm, avg 4µs/call # 229 times (630µs+189µs) by Moose::Meta::Role::Application::ToRole::apply_methods at line 101 of Moose/Meta/Role/Application/ToRole.pm, avg 4µs/call sub is_method_aliased {
41 | 514 | 147µs |  |  | my ($self, $method_name) = @_;
42 | 514 | 1.11ms | 514 | 471µs | exists $self->get_method_aliases->{$method_name} ? 1 : 0 # spent 471µs making 514 calls to Moose::Meta::Role::Application::get_method_aliases, avg 916ns/call
43 |  |  |  |  | }
44 |  |  |  |  |
45 |  |  |  |  | # spent 126µs (99+27) within Moose::Meta::Role::Application::is_aliased_method which was called 22 times, avg 6µs/call: # 22 times (99µs+27µs) by Moose::Meta::Role::Application::ToRole::check_required_methods at line 41 of Moose/Meta/Role/Application/ToRole.pm, avg 6µs/call sub is_aliased_method {
46 | 22 | 7µs |  |  | my ($self, $method_name) = @_;
47 | 22 | 41µs | 22 | 27µs | my %aliased_names = reverse %{$self->get_method_aliases}; # spent 27µs making 22 calls to Moose::Meta::Role::Application::get_method_aliases, avg 1µs/call
48 | 22 | 48µs |  |  | exists $aliased_names{$method_name} ? 1 : 0;
49 |  |  |  |  | }
50 |  |  |  |  |
51 |  |  |  |  | # spent 426ms (1.68+424) within Moose::Meta::Role::Application::apply which was called 61 times, avg 6.98ms/call: # 28 times (777µs+333ms) by Moose::Meta::Role::Application::ToClass::apply at line 31 of Moose/Meta/Role/Application/ToClass.pm, avg 11.9ms/call # 19 times (530µs+56.1ms) by Moose::Meta::Role::Composite::apply_params at line 178 of Moose/Meta/Role/Composite.pm, avg 2.98ms/call # 14 times (371µs+35.6ms) by Moose::Meta::Role::Application::ToRole::apply at line 14 of Moose/Meta/Role/Application/ToRole.pm, avg 2.57ms/call sub apply {
52 | 61 | 15µs |  |  | my $self = shift;
53 |  |  |  |  |
54 | 61 | 114µs | 61 | 6.61ms | $self->check_role_exclusions(@_); # spent 5.28ms making 28 calls to Moose::Meta::Role::Application::ToClass::check_role_exclusions, avg 189µs/call # spent 1.03ms making 19 calls to Moose::Meta::Role::Application::RoleSummation::check_role_exclusions, avg 54µs/call # spent 292µs making 14 calls to Moose::Meta::Role::Application::ToRole::check_role_exclusions, avg 21µs/call
55 | 61 | 108µs | 61 | 11.8ms | $self->check_required_methods(@_); # spent 7.05ms making 19 calls to Moose::Meta::Role::Application::RoleSummation::check_required_methods, avg 371µs/call # spent 2.89ms making 28 calls to Moose::Meta::Role::Application::ToClass::check_required_methods, avg 103µs/call # spent 1.85ms making 14 calls to Moose::Meta::Role::Application::ToRole::check_required_methods, avg 132µs/call
56 | 61 | 104µs | 61 | 60µs | $self->check_required_attributes(@_); # spent 25µs making 28 calls to Moose::Meta::Role::Application::ToClass::check_required_attributes, avg 893ns/call # spent 20µs making 19 calls to Moose::Meta::Role::Application::RoleSummation::check_required_attributes, avg 1µs/call # spent 15µs making 14 calls to Moose::Meta::Role::Application::ToRole::check_required_attributes, avg 1µs/call
57 |  |  |  |  |
58 | 61 | 104µs | 61 | 3.83ms | $self->apply_overloading(@_); # spent 2.40ms making 19 calls to Moose::Meta::Role::Application::RoleSummation::apply_overloading, avg 126µs/call # spent 1.43ms making 42 calls to Moose::Meta::Role::Application::apply_overloading, avg 34µs/call
59 | 61 | 111µs | 61 | 273ms | $self->apply_attributes(@_); # spent 271ms making 28 calls to Moose::Meta::Role::Application::ToClass::apply_attributes, avg 9.67ms/call, recursion: max depth 1, sum of overlapping time 2.62ms # spent 4.81ms making 19 calls to Moose::Meta::Role::Application::RoleSummation::apply_attributes, avg 253µs/call # spent 327µs making 14 calls to Moose::Meta::Role::Application::ToRole::apply_attributes, avg 23µs/call
60 | 61 | 143µs | 61 | 124ms | $self->apply_methods(@_); # spent 47.5ms making 28 calls to Moose::Meta::Role::Application::ToClass::apply_methods, avg 1.70ms/call # spent 44.2ms making 14 calls to Moose::Meta::Role::Application::ToRole::apply_methods, avg 3.15ms/call # spent 32.8ms making 19 calls to Moose::Meta::Role::Application::RoleSummation::apply_methods, avg 1.72ms/call
61 |  |  |  |  |
62 | 61 | 132µs | 61 | 16.5ms | $self->apply_override_method_modifiers(@_); # spent 13.4ms making 28 calls to Moose::Meta::Role::Application::ToClass::apply_override_method_modifiers, avg 480µs/call # spent 1.86ms making 14 calls to Moose::Meta::Role::Application::ToRole::apply_override_method_modifiers, avg 133µs/call # spent 1.17ms making 19 calls to Moose::Meta::Role::Application::RoleSummation::apply_override_method_modifiers, avg 61µs/call
63 |  |  |  |  |
64 | 61 | 139µs | 61 | 7.29ms | $self->apply_before_method_modifiers(@_); # spent 7.29ms making 61 calls to Moose::Meta::Role::Application::apply_before_method_modifiers, avg 119µs/call
65 | 61 | 106µs | 61 | 5.61ms | $self->apply_around_method_modifiers(@_); # spent 5.61ms making 61 calls to Moose::Meta::Role::Application::apply_around_method_modifiers, avg 92µs/call
66 | 61 | 212µs | 61 | 1.05ms | $self->apply_after_method_modifiers(@_); # spent 1.05ms making 61 calls to Moose::Meta::Role::Application::apply_after_method_modifiers, avg 17µs/call
67 |  |  |  |  | }
68 |  |  |  |  |
69 |  |  |  |  | sub check_role_exclusions { throw_exception( "CannotCallAnAbstractMethod" ); }
70 |  |  |  |  | sub check_required_methods { throw_exception( "CannotCallAnAbstractMethod" ); }
71 |  |  |  |  | sub check_required_attributes { throw_exception( "CannotCallAnAbstractMethod" ); }
72 |  |  |  |  |
73 |  |  |  |  | sub apply_attributes { throw_exception( "CannotCallAnAbstractMethod" ); }
74 |  |  |  |  | sub apply_methods { throw_exception( "CannotCallAnAbstractMethod" ); }
75 |  |  |  |  | sub apply_override_method_modifiers { throw_exception( "CannotCallAnAbstractMethod" ); }
76 |  |  |  |  | sub apply_method_modifiers { throw_exception( "CannotCallAnAbstractMethod" ); }
77 |  |  |  |  |
78 | 61 | 208µs | 61 | 2.15ms | # spent 7.29ms (5.14+2.15) within Moose::Meta::Role::Application::apply_before_method_modifiers which was called 61 times, avg 119µs/call: # 61 times (5.14ms+2.15ms) by Moose::Meta::Role::Application::apply at line 64, avg 119µs/call sub apply_before_method_modifiers { (shift)->apply_method_modifiers('before' => @_) } # spent 1.33ms making 28 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 48µs/call # spent 569µs making 19 calls to Moose::Meta::Role::Application::RoleSummation::apply_method_modifiers, avg 30µs/call # spent 245µs making 14 calls to Moose::Meta::Role::Application::ToRole::apply_method_modifiers, avg 18µs/call
79 | 61 | 145µs | 61 | 5.43ms | # spent 5.61ms (180µs+5.43) within Moose::Meta::Role::Application::apply_around_method_modifiers which was called 61 times, avg 92µs/call: # 61 times (180µs+5.43ms) by Moose::Meta::Role::Application::apply at line 65, avg 92µs/call sub apply_around_method_modifiers { (shift)->apply_method_modifiers('around' => @_) } # spent 4.09ms making 28 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 146µs/call # spent 694µs making 19 calls to Moose::Meta::Role::Application::RoleSummation::apply_method_modifiers, avg 37µs/call # spent 638µs making 14 calls to Moose::Meta::Role::Application::ToRole::apply_method_modifiers, avg 46µs/call
80 | 61 | 143µs | 61 | 882µs | # spent 1.05ms (168µs+882µs) within Moose::Meta::Role::Application::apply_after_method_modifiers which was called 61 times, avg 17µs/call: # 61 times (168µs+882µs) by Moose::Meta::Role::Application::apply at line 66, avg 17µs/call sub apply_after_method_modifiers { (shift)->apply_method_modifiers('after' => @_) } # spent 476µs making 19 calls to Moose::Meta::Role::Application::RoleSummation::apply_method_modifiers, avg 25µs/call # spent 276µs making 28 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 10µs/call # spent 130µs making 14 calls to Moose::Meta::Role::Application::ToRole::apply_method_modifiers, avg 9µs/call
81 |  |  |  |  |
82 |  |  |  |  | # spent 1.43ms (154µs+1.28) within Moose::Meta::Role::Application::apply_overloading which was called 42 times, avg 34µs/call: # 42 times (154µs+1.28ms) by Moose::Meta::Role::Application::apply at line 58, avg 34µs/call sub apply_overloading {
83 | 42 | 17µs |  |  | my ( $self, $role, $other ) = @_;
84 |  |  |  |  |
85 | 42 | 139µs | 42 | 1.28ms | return unless $role->is_overloaded; # spent 1.15ms making 23 calls to Class::MOP::Mixin::HasOverloads::is_overloaded, avg 50µs/call # spent 126µs making 19 calls to Moose::Meta::Role::Composite::is_overloaded, avg 7µs/call
86 |  |  |  |  |
87 |  |  |  |  | unless ( $other->is_overloaded ) {
88 |  |  |  |  | $other->set_overload_fallback_value(
89 |  |  |  |  | $role->get_overload_fallback_value );
90 |  |  |  |  | }
91 |  |  |  |  |
92 |  |  |  |  | for my $overload ( $role->get_all_overloaded_operators ) {
93 |  |  |  |  | next if $other->has_overloaded_operator( $overload->operator );
94 |  |  |  |  | $other->add_overloaded_operator(
95 |  |  |  |  | $overload->operator => $overload->clone );
96 |  |  |  |  | }
97 |  |  |  |  | }
98 |  |  |  |  |
99 | 1 | 5µs |  |  | 1;
100 |  |  |  |  |
101 |  |  |  |  | # ABSTRACT: A base class for role application
102 |  |  |  |  |
103 |  |  |  |  | __END__