Filename | /Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Meta/Role/Application.pm |
Statements | Executed 2555 statements in 3.18ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
415 | 2 | 2 | 1.31ms | 1.71ms | is_method_excluded | Moose::Meta::Role::Application::
415 | 2 | 2 | 1.15ms | 1.58ms | is_method_aliased | Moose::Meta::Role::Application::
24 | 3 | 3 | 511µs | 247ms | apply (recurses: max depth 1, inclusive time 89.7ms) | Moose::Meta::Role::Application::
24 | 2 | 2 | 96µs | 466µs | new | Moose::Meta::Role::Application::
20 | 1 | 1 | 76µs | 96µs | is_aliased_method | Moose::Meta::Role::Application::
24 | 1 | 1 | 70µs | 967µs | apply_before_method_modifiers | Moose::Meta::Role::Application::
24 | 1 | 1 | 58µs | 427µs | apply_after_method_modifiers | Moose::Meta::Role::Application::
24 | 1 | 1 | 58µs | 4.67ms | apply_around_method_modifiers | Moose::Meta::Role::Application::
24 | 2 | 1 | 27µs | 27µs | __ANON__[:23] | Moose::Meta::Role::Application::
24 | 2 | 1 | 21µs | 21µs | __ANON__[:16] | Moose::Meta::Role::Application::
1 | 1 | 1 | 8µs | 8µs | BEGIN@2 | Moose::Meta::Role::Application::
1 | 1 | 1 | 6µs | 331µs | BEGIN@11 | Moose::Meta::Role::Application::
1 | 1 | 1 | 6µs | 9µs | BEGIN@10 | Moose::Meta::Role::Application::
1 | 1 | 1 | 6µs | 16µs | BEGIN@9 | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | apply_attributes | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | apply_method_modifiers | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | apply_methods | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | apply_override_method_modifiers | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | check_required_attributes | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | check_required_methods | Moose::Meta::Role::Application::
0 | 0 | 0 | 0s | 0s | check_role_exclusions | Moose::Meta::Role::Application::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Moose::Meta::Role::Application; | ||||
2 | # spent 8µs within Moose::Meta::Role::Application::BEGIN@2 which was called:
# once (8µs+0s) by Moose::BEGIN@37 at line 4 | ||||
3 | 1 | 4µs | $Moose::Meta::Role::Application::AUTHORITY = 'cpan:STEVAN'; | ||
4 | 1 | 28µs | 1 | 8µs | } # spent 8µs making 1 call to Moose::Meta::Role::Application::BEGIN@2 |
5 | { | ||||
6 | 2 | 600ns | $Moose::Meta::Role::Application::VERSION = '2.1005'; | ||
7 | } | ||||
8 | |||||
9 | 2 | 20µs | 2 | 26µs | # spent 16µs (6+10) within Moose::Meta::Role::Application::BEGIN@9 which was called:
# once (6µs+10µs) by Moose::BEGIN@37 at line 9 # spent 16µs making 1 call to Moose::Meta::Role::Application::BEGIN@9
# spent 10µs making 1 call to strict::import |
10 | 2 | 18µs | 2 | 12µs | # spent 9µs (6+3) within Moose::Meta::Role::Application::BEGIN@10 which was called:
# once (6µs+3µs) by Moose::BEGIN@37 at line 10 # spent 9µs making 1 call to Moose::Meta::Role::Application::BEGIN@10
# spent 3µs making 1 call to warnings::import |
11 | 2 | 437µs | 2 | 655µs | # spent 331µs (6+324) within Moose::Meta::Role::Application::BEGIN@11 which was called:
# once (6µs+324µs) by Moose::BEGIN@37 at line 11 # spent 331µs making 1 call to Moose::Meta::Role::Application::BEGIN@11
# spent 324µs making 1 call to metaclass::import |
12 | |||||
13 | __PACKAGE__->meta->add_attribute('method_exclusions' => ( | ||||
14 | init_arg => '-excludes', | ||||
15 | reader => 'get_method_exclusions', | ||||
16 | 24 | 46µs | # spent 21µs within Moose::Meta::Role::Application::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Meta/Role/Application.pm:16] which was called 24 times, avg 875ns/call:
# 14 times (13µs+0s) by Moose::Meta::Role::Application::RoleSummation::_new or Moose::Meta::Role::Application::ToRole::_new at line 21 of (eval 74)[Eval/Closure.pm:135], avg 921ns/call
# 10 times (8µs+0s) by Moose::Meta::Role::Application::ToClass::_new at line 24 of (eval 74)[Eval/Closure.pm:135], avg 810ns/call | ||
17 | 1 | 6µs | 3 | 289µs | Class::MOP::_definition_context(), # spent 271µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute
# spent 13µ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 | 24 | 49µs | # spent 27µs within Moose::Meta::Role::Application::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Meta/Role/Application.pm:23] which was called 24 times, avg 1µs/call:
# 14 times (17µs+0s) by Moose::Meta::Role::Application::RoleSummation::_new or Moose::Meta::Role::Application::ToRole::_new at line 15 of (eval 74)[Eval/Closure.pm:135], avg 1µs/call
# 10 times (11µs+0s) by Moose::Meta::Role::Application::ToClass::_new at line 18 of (eval 74)[Eval/Closure.pm:135], avg 1µs/call | ||
24 | 1 | 4µs | 3 | 270µs | Class::MOP::_definition_context(), # spent 257µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute
# spent 8µs making 1 call to Moose::Meta::Role::Application::meta
# spent 5µs making 1 call to Class::MOP::_definition_context |
25 | )); | ||||
26 | |||||
27 | # spent 466µs (96+370) within Moose::Meta::Role::Application::new which was called 24 times, avg 19µs/call:
# 21 times (74µs+312µs) by Moose::Meta::Role::apply at line 470 of Moose/Meta/Role.pm, avg 18µs/call
# 3 times (22µs+58µs) by Moose::Meta::Role::Composite::apply_params at line 132 of Moose/Meta/Role/Composite.pm, avg 27µs/call | ||||
28 | 24 | 19µs | my ($class, %params) = @_; | ||
29 | 24 | 63µs | 24 | 370µs | $class->_new(\%params); # spent 157µs making 11 calls to Moose::Meta::Role::Application::ToRole::_new, avg 14µs/call
# spent 154µs making 10 calls to Moose::Meta::Role::Application::ToClass::_new, avg 15µs/call
# spent 58µs making 3 calls to Moose::Meta::Role::Application::RoleSummation::_new, avg 20µs/call |
30 | } | ||||
31 | |||||
32 | # spent 1.71ms (1.31+392µs) within Moose::Meta::Role::Application::is_method_excluded which was called 415 times, avg 4µs/call:
# 216 times (685µs+202µs) by Moose::Meta::Role::Application::ToRole::apply_methods at line 88 of Moose/Meta/Role/Application/ToRole.pm, avg 4µs/call
# 199 times (629µs+189µs) by Moose::Meta::Role::Application::ToClass::apply_methods at line 167 of Moose/Meta/Role/Application/ToClass.pm, avg 4µs/call | ||||
33 | 415 | 87µs | my ($self, $method_name) = @_; | ||
34 | 415 | 398µs | 415 | 392µs | foreach (@{$self->get_method_exclusions}) { # spent 392µs making 415 calls to Moose::Meta::Role::Application::get_method_exclusions, avg 944ns/call |
35 | return 1 if $_ eq $method_name; | ||||
36 | } | ||||
37 | 415 | 577µs | return 0; | ||
38 | } | ||||
39 | |||||
40 | # spent 1.58ms (1.15+429µs) within Moose::Meta::Role::Application::is_method_aliased which was called 415 times, avg 4µs/call:
# 216 times (600µs+230µs) by Moose::Meta::Role::Application::ToRole::apply_methods at line 106 of Moose/Meta/Role/Application/ToRole.pm, avg 4µs/call
# 199 times (553µs+199µs) by Moose::Meta::Role::Application::ToClass::apply_methods at line 179 of Moose/Meta/Role/Application/ToClass.pm, avg 4µs/call | ||||
41 | 415 | 102µs | my ($self, $method_name) = @_; | ||
42 | 415 | 813µs | 415 | 429µs | exists $self->get_method_aliases->{$method_name} ? 1 : 0 # spent 429µs making 415 calls to Moose::Meta::Role::Application::get_method_aliases, avg 1µs/call |
43 | } | ||||
44 | |||||
45 | # spent 96µs (76+20) within Moose::Meta::Role::Application::is_aliased_method which was called 20 times, avg 5µs/call:
# 20 times (76µs+20µs) by Moose::Meta::Role::Application::ToRole::check_required_methods at line 43 of Moose/Meta/Role/Application/ToRole.pm, avg 5µs/call | ||||
46 | 20 | 5µs | my ($self, $method_name) = @_; | ||
47 | 20 | 26µs | 20 | 20µs | my %aliased_names = reverse %{$self->get_method_aliases}; # spent 20µs making 20 calls to Moose::Meta::Role::Application::get_method_aliases, avg 1µs/call |
48 | 20 | 33µs | exists $aliased_names{$method_name} ? 1 : 0; | ||
49 | } | ||||
50 | |||||
51 | # spent 247ms (511µs+247) within Moose::Meta::Role::Application::apply which was called 24 times, avg 10.3ms/call:
# 11 times (224µs+3.25ms) by Moose::Meta::Role::Application::ToRole::apply at line 19 of Moose/Meta/Role/Application/ToRole.pm, avg 316µs/call
# 10 times (213µs+240ms) by Moose::Meta::Role::Application::ToClass::apply at line 36 of Moose/Meta/Role/Application/ToClass.pm, avg 24.0ms/call
# 3 times (74µs+4.03ms) by Moose::Meta::Role::Composite::apply_params at line 132 of Moose/Meta/Role/Composite.pm, avg 1.37ms/call | ||||
52 | 24 | 3µs | my $self = shift; | ||
53 | |||||
54 | 24 | 27µs | 24 | 2.50ms | $self->check_role_exclusions(@_); # spent 2.16ms making 10 calls to Moose::Meta::Role::Application::ToClass::check_role_exclusions, avg 216µs/call
# spent 187µs making 11 calls to Moose::Meta::Role::Application::ToRole::check_role_exclusions, avg 17µs/call
# spent 153µs making 3 calls to Moose::Meta::Role::Application::RoleSummation::check_role_exclusions, avg 51µs/call |
55 | 24 | 28µs | 24 | 2.48ms | $self->check_required_methods(@_); # spent 1.48ms making 11 calls to Moose::Meta::Role::Application::ToRole::check_required_methods, avg 134µs/call
# spent 553µs making 3 calls to Moose::Meta::Role::Application::RoleSummation::check_required_methods, avg 184µs/call
# spent 444µs making 10 calls to Moose::Meta::Role::Application::ToClass::check_required_methods, avg 44µs/call |
56 | 24 | 25µs | 24 | 19µs | $self->check_required_attributes(@_); # spent 8µs making 10 calls to Moose::Meta::Role::Application::ToClass::check_required_attributes, avg 830ns/call
# spent 8µs making 11 calls to Moose::Meta::Role::Application::ToRole::check_required_attributes, avg 718ns/call
# spent 2µs making 3 calls to Moose::Meta::Role::Application::RoleSummation::check_required_attributes, avg 800ns/call |
57 | |||||
58 | 24 | 27µs | 24 | 234ms | $self->apply_attributes(@_); # spent 240ms making 10 calls to Moose::Meta::Role::Application::ToClass::apply_attributes, avg 24.0ms/call, recursion: max depth 1, sum of overlapping time 8.01ms
# spent 1.25ms making 3 calls to Moose::Meta::Role::Application::RoleSummation::apply_attributes, avg 418µs/call
# spent 226µs making 11 calls to Moose::Meta::Role::Application::ToRole::apply_attributes, avg 21µs/call |
59 | 24 | 33µs | 24 | 78.0ms | $self->apply_methods(@_); # spent 35.7ms making 11 calls to Moose::Meta::Role::Application::ToRole::apply_methods, avg 3.25ms/call
# spent 32.7ms making 10 calls to Moose::Meta::Role::Application::ToClass::apply_methods, avg 3.27ms/call
# spent 9.58ms making 3 calls to Moose::Meta::Role::Application::RoleSummation::apply_methods, avg 3.19ms/call |
60 | |||||
61 | 24 | 31µs | 24 | 6.00ms | $self->apply_override_method_modifiers(@_); # spent 4.24ms making 10 calls to Moose::Meta::Role::Application::ToClass::apply_override_method_modifiers, avg 424µs/call
# spent 1.54ms making 11 calls to Moose::Meta::Role::Application::ToRole::apply_override_method_modifiers, avg 140µs/call
# spent 226µs making 3 calls to Moose::Meta::Role::Application::RoleSummation::apply_override_method_modifiers, avg 75µs/call |
62 | |||||
63 | 24 | 34µs | 24 | 967µs | $self->apply_before_method_modifiers(@_); # spent 967µs making 24 calls to Moose::Meta::Role::Application::apply_before_method_modifiers, avg 40µs/call |
64 | 24 | 31µs | 24 | 4.67ms | $self->apply_around_method_modifiers(@_); # spent 4.67ms making 24 calls to Moose::Meta::Role::Application::apply_around_method_modifiers, avg 195µs/call |
65 | 24 | 64µs | 24 | 427µs | $self->apply_after_method_modifiers(@_); # spent 427µs making 24 calls to Moose::Meta::Role::Application::apply_after_method_modifiers, avg 18µs/call |
66 | } | ||||
67 | |||||
68 | sub check_role_exclusions { Carp::croak "Abstract Method" } | ||||
69 | sub check_required_methods { Carp::croak "Abstract Method" } | ||||
70 | sub check_required_attributes { Carp::croak "Abstract Method" } | ||||
71 | |||||
72 | sub apply_attributes { Carp::croak "Abstract Method" } | ||||
73 | sub apply_methods { Carp::croak "Abstract Method" } | ||||
74 | sub apply_override_method_modifiers { Carp::croak "Abstract Method" } | ||||
75 | sub apply_method_modifiers { Carp::croak "Abstract Method" } | ||||
76 | |||||
77 | 24 | 50µs | 24 | 897µs | # spent 967µs (70+897) within Moose::Meta::Role::Application::apply_before_method_modifiers which was called 24 times, avg 40µs/call:
# 24 times (70µs+897µs) by Moose::Meta::Role::Application::apply at line 63, avg 40µs/call # spent 682µs making 10 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 68µs/call
# spent 142µs making 11 calls to Moose::Meta::Role::Application::ToRole::apply_method_modifiers, avg 13µs/call
# spent 73µs making 3 calls to Moose::Meta::Role::Application::RoleSummation::apply_method_modifiers, avg 24µs/call |
78 | 24 | 42µs | 24 | 4.61ms | # spent 4.67ms (58µs+4.61) within Moose::Meta::Role::Application::apply_around_method_modifiers which was called 24 times, avg 195µs/call:
# 24 times (58µs+4.61ms) by Moose::Meta::Role::Application::apply at line 64, avg 195µs/call # spent 3.88ms making 10 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 388µs/call
# spent 576µs making 11 calls to Moose::Meta::Role::Application::ToRole::apply_method_modifiers, avg 52µs/call
# spent 155µs making 3 calls to Moose::Meta::Role::Application::RoleSummation::apply_method_modifiers, avg 52µs/call |
79 | 24 | 43µs | 24 | 369µs | # spent 427µs (58+369) within Moose::Meta::Role::Application::apply_after_method_modifiers which was called 24 times, avg 18µs/call:
# 24 times (58µs+369µs) by Moose::Meta::Role::Application::apply at line 65, avg 18µs/call # spent 203µs making 10 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 20µs/call
# spent 103µs making 11 calls to Moose::Meta::Role::Application::ToRole::apply_method_modifiers, avg 9µs/call
# spent 63µs making 3 calls to Moose::Meta::Role::Application::RoleSummation::apply_method_modifiers, avg 21µs/call |
80 | |||||
81 | 1 | 6µs | 1; | ||
82 | |||||
83 | # ABSTRACT: A base class for role application | ||||
84 | |||||
85 | __END__ |