Profile of /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/Role/Application.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For 05.Domain_and_Item.t
Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:57 2010

File | /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/Role/Application.pm
Statements Executed | 1250
Statement Execution Time | 2.87ms

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
26 | 2 | 2 | 860µs | 137ms | Moose::Meta::Role::Application::::applyMoose::Meta::Role::Application::apply
137 | 2 | 2 | 697µs | 898µs | Moose::Meta::Role::Application::::is_method_excludedMoose::Meta::Role::Application::is_method_excluded
137 | 2 | 2 | 578µs | 798µs | Moose::Meta::Role::Application::::is_method_aliasedMoose::Meta::Role::Application::is_method_aliased
26 | 1 | 1 | 200µs | 710µs | Moose::Meta::Role::Application::::newMoose::Meta::Role::Application::new
26 | 1 | 1 | 114µs | 3.91ms | Moose::Meta::Role::Application::::apply_before_method_modifiersMoose::Meta::Role::Application::apply_before_method_modifiers
26 | 1 | 1 | 99µs | 5.16ms | Moose::Meta::Role::Application::::apply_after_method_modifiersMoose::Meta::Role::Application::apply_after_method_modifiers
26 | 1 | 1 | 95µs | 3.60ms | Moose::Meta::Role::Application::::apply_around_method_modifiersMoose::Meta::Role::Application::apply_around_method_modifiers
10 | 1 | 1 | 63µs | 81µs | Moose::Meta::Role::Application::::is_aliased_methodMoose::Meta::Role::Application::is_aliased_method
26 | 2 | 2 | 49µs | 49µs | Moose::Meta::Role::Application::::__ANON__[:14]Moose::Meta::Role::Application::__ANON__[:14]
26 | 2 | 2 | 47µs | 47µs | Moose::Meta::Role::Application::::__ANON__[:20]Moose::Meta::Role::Application::__ANON__[:20]
1 | 1 | 1 | 14µs | 17µs | Moose::Meta::Role::Application::::BEGIN@3Moose::Meta::Role::Application::BEGIN@3
1 | 1 | 1 | 8µs | 108µs | Moose::Meta::Role::Application::::BEGIN@5Moose::Meta::Role::Application::BEGIN@5
1 | 1 | 1 | 7µs | 16µs | Moose::Meta::Role::Application::::BEGIN@4Moose::Meta::Role::Application::BEGIN@4
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 |  |  |  |  |
3 | 3 | 21µs | 2 | 20µs | # spent 17µs (14+3) within Moose::Meta::Role::Application::BEGIN@3 which was called # once (14µs+3µs) by Moose::BEGIN@28 at line 3 use strict; # spent 17µs making 1 call to Moose::Meta::Role::Application::BEGIN@3 # spent 3µs making 1 call to strict::import
4 | 3 | 18µs | 2 | 25µs | # spent 16µs (7+9) within Moose::Meta::Role::Application::BEGIN@4 which was called # once (7µs+9µs) by Moose::BEGIN@28 at line 4 use warnings; # spent 16µs making 1 call to Moose::Meta::Role::Application::BEGIN@4 # spent 9µs making 1 call to warnings::import
5 | 3 | 461µs | 2 | 209µs | # spent 108µs (8+101) within Moose::Meta::Role::Application::BEGIN@5 which was called # once (8µs+101µs) by Moose::BEGIN@28 at line 5 use metaclass; # spent 108µs making 1 call to Moose::Meta::Role::Application::BEGIN@5 # spent 101µs making 1 call to metaclass::import
6 |  |  |  |  |
7 | 1 | 600ns |  |  | our $VERSION = '0.98';
8 | 1 | 20µs |  |  | $VERSION = eval $VERSION;
9 | 1 | 400ns |  |  | our $AUTHORITY = 'cpan:STEVAN';
10 |  |  |  |  |
11 |  |  |  |  | __PACKAGE__->meta->add_attribute('method_exclusions' => (
12 |  |  |  |  | init_arg => '-excludes',
13 |  |  |  |  | reader => 'get_method_exclusions',
14 | 26 | 76µs |  |  | # spent 49µs within Moose::Meta::Role::Application::__ANON__[/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/Role/Application.pm:14] which was called 26 times, avg 2µs/call: # 13 times (30µs+0s) by Moose::Meta::Role::Application::ToClass::_new at line 17 of (eval 0)[Class/MOP/Method/Generated.pm:54] at line 54 of Class/MOP/Method/Generated.pm, avg 2µs/call # 13 times (19µs+0s) by Moose::Meta::Role::Application::ToRole::_new at line 11 of (eval 0)[Class/MOP/Method/Generated.pm:54] at line 54 of Class/MOP/Method/Generated.pm, avg 1µs/call default => sub { [] }
15 | 1 | 7µs | 2 | 294µs | )); # spent 277µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute # spent 17µs making 1 call to Moose::Meta::Role::Application::meta
16 |  |  |  |  |
17 |  |  |  |  | __PACKAGE__->meta->add_attribute('method_aliases' => (
18 |  |  |  |  | init_arg => '-alias',
19 |  |  |  |  | reader => 'get_method_aliases',
20 | 26 | 70µs |  |  | # spent 47µs within Moose::Meta::Role::Application::__ANON__[/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/Role/Application.pm:20] which was called 26 times, avg 2µs/call: # 13 times (28µs+0s) by Moose::Meta::Role::Application::ToClass::_new at line 22 of (eval 0)[Class/MOP/Method/Generated.pm:54] at line 54 of Class/MOP/Method/Generated.pm, avg 2µs/call # 13 times (19µs+0s) by Moose::Meta::Role::Application::ToRole::_new at line 16 of (eval 0)[Class/MOP/Method/Generated.pm:54] at line 54 of Class/MOP/Method/Generated.pm, avg 1µs/call default => sub { {} }
21 | 1 | 4µs | 2 | 283µs | )); # spent 272µs making 1 call to Class::MOP::Mixin::HasAttributes::add_attribute # spent 11µs making 1 call to Moose::Meta::Role::Application::meta
22 |  |  |  |  |
23 |  |  |  |  | # spent 710µs (200+510) within Moose::Meta::Role::Application::new which was called 26 times, avg 27µs/call: # 26 times (200µs+510µs) by Moose::Meta::Role::apply at line 419 of Moose/Meta/Role.pm, avg 27µs/call sub new {
24 | 26 | 25µs |  |  | my ($class, %params) = @_;
25 |  |  |  |  |
26 | 26 | 19µs |  |  | if ( exists $params{excludes} && !exists $params{'-excludes'} ) {
27 |  |  |  |  | $params{'-excludes'} = delete $params{excludes};
28 |  |  |  |  | }
29 | 26 | 11µs |  |  | if ( exists $params{alias} && !exists $params{'-alias'} ) {
30 |  |  |  |  | $params{'-alias'} = delete $params{alias};
31 |  |  |  |  | }
32 |  |  |  |  |
33 | 26 | 7µs |  |  | if ( exists $params{'-excludes'} ) {
34 |  |  |  |  |
35 |  |  |  |  | # I wish we had coercion here :)
36 |  |  |  |  | $params{'-excludes'} = (
37 |  |  |  |  | ref $params{'-excludes'} eq 'ARRAY'
38 |  |  |  |  | ? $params{'-excludes'}
39 |  |  |  |  | : [ $params{'-excludes'} ]
40 |  |  |  |  | );
41 |  |  |  |  | }
42 |  |  |  |  |
43 | 26 | 116µs | 26 | 510µs | $class->_new(\%params); # spent 309µs making 13 calls to Moose::Meta::Role::Application::ToClass::_new, avg 24µs/call # spent 200µs making 13 calls to Moose::Meta::Role::Application::ToRole::_new, avg 15µs/call
44 |  |  |  |  | }
45 |  |  |  |  |
46 |  |  |  |  | # spent 898µs (697+200) within Moose::Meta::Role::Application::is_method_excluded which was called 137 times, avg 7µs/call: # 69 times (328µs+94µs) by Moose::Meta::Role::Application::ToRole::apply_methods at line 77 of Moose/Meta/Role/Application/ToRole.pm, avg 6µs/call # 68 times (369µs+106µs) by Moose::Meta::Role::Application::ToClass::apply_methods at line 154 of Moose/Meta/Role/Application/ToClass.pm, avg 7µs/call sub is_method_excluded {
47 | 137 | 70µs |  |  | my ($self, $method_name) = @_;
48 | 137 | 246µs | 137 | 200µs | foreach (@{$self->get_method_exclusions}) { # spent 200µs making 137 calls to Moose::Meta::Role::Application::get_method_exclusions, avg 1µs/call
49 |  |  |  |  | return 1 if $_ eq $method_name;
50 |  |  |  |  | }
51 | 137 | 270µs |  |  | return 0;
52 |  |  |  |  | }
53 |  |  |  |  |
54 |  |  |  |  | # spent 798µs (578+220) within Moose::Meta::Role::Application::is_method_aliased which was called 137 times, avg 6µs/call: # 69 times (277µs+101µs) by Moose::Meta::Role::Application::ToRole::apply_methods at line 97 of Moose/Meta/Role/Application/ToRole.pm, avg 5µs/call # 68 times (301µs+119µs) by Moose::Meta::Role::Application::ToClass::apply_methods at line 170 of Moose/Meta/Role/Application/ToClass.pm, avg 6µs/call sub is_method_aliased {
55 | 137 | 71µs |  |  | my ($self, $method_name) = @_;
56 | 137 | 408µs | 137 | 220µs | exists $self->get_method_aliases->{$method_name} ? 1 : 0 # spent 220µs making 137 calls to Moose::Meta::Role::Application::get_method_aliases, avg 2µs/call
57 |  |  |  |  | }
58 |  |  |  |  |
59 |  |  |  |  | # spent 81µs (63+17) within Moose::Meta::Role::Application::is_aliased_method which was called 10 times, avg 8µs/call: # 10 times (63µs+17µs) by Moose::Meta::Role::Application::ToRole::check_required_methods at line 41 of Moose/Meta/Role/Application/ToRole.pm, avg 8µs/call sub is_aliased_method {
60 | 10 | 6µs |  |  | my ($self, $method_name) = @_;
61 | 10 | 27µs | 10 | 18µs | my %aliased_names = reverse %{$self->get_method_aliases}; # spent 18µs making 10 calls to Moose::Meta::Role::Application::get_method_aliases, avg 2µs/call
62 | 10 | 23µs |  |  | exists $aliased_names{$method_name} ? 1 : 0;
63 |  |  |  |  | }
64 |  |  |  |  |
65 |  |  |  |  | # spent 137ms (860µs+137) within Moose::Meta::Role::Application::apply which was called 26 times, avg 5.28ms/call: # 13 times (464µs+105ms) by Moose::Meta::Role::Application::ToClass::apply at line 31 of Moose/Meta/Role/Application/ToClass.pm, avg 8.09ms/call # 13 times (396µs+31.9ms) by Moose::Meta::Role::Application::ToRole::apply at line 17 of Moose/Meta/Role/Application/ToRole.pm, avg 2.48ms/call sub apply {
66 | 26 | 10µs |  |  | my $self = shift;
67 |  |  |  |  |
68 | 26 | 56µs | 26 | 3.39ms | $self->check_role_exclusions(@_); # spent 3.08ms making 13 calls to Moose::Meta::Role::Application::ToClass::check_role_exclusions, avg 237µs/call # spent 301µs making 13 calls to Moose::Meta::Role::Application::ToRole::check_role_exclusions, avg 23µs/call
69 | 26 | 56µs | 26 | 1.72ms | $self->check_required_methods(@_); # spent 1.32ms making 13 calls to Moose::Meta::Role::Application::ToRole::check_required_methods, avg 102µs/call # spent 401µs making 13 calls to Moose::Meta::Role::Application::ToClass::check_required_methods, avg 31µs/call
70 | 26 | 42µs | 26 | 31µs | $self->check_required_attributes(@_); # spent 18µs making 13 calls to Moose::Meta::Role::Application::ToClass::check_required_attributes, avg 1µs/call # spent 13µs making 13 calls to Moose::Meta::Role::Application::ToRole::check_required_attributes, avg 985ns/call
71 |  |  |  |  |
72 | 26 | 49µs | 26 | 64.1ms | $self->apply_attributes(@_); # spent 61.5ms making 13 calls to Moose::Meta::Role::Application::ToClass::apply_attributes, avg 4.73ms/call # spent 2.63ms making 13 calls to Moose::Meta::Role::Application::ToRole::apply_attributes, avg 202µs/call
73 | 26 | 120µs | 26 | 54.2ms | $self->apply_methods(@_); # spent 28.0ms making 13 calls to Moose::Meta::Role::Application::ToClass::apply_methods, avg 2.15ms/call # spent 26.2ms making 13 calls to Moose::Meta::Role::Application::ToRole::apply_methods, avg 2.02ms/call
74 |  |  |  |  |
75 | 26 | 55µs | 26 | 405µs | $self->apply_override_method_modifiers(@_); # spent 250µs making 13 calls to Moose::Meta::Role::Application::ToClass::apply_override_method_modifiers, avg 19µs/call # spent 156µs making 13 calls to Moose::Meta::Role::Application::ToRole::apply_override_method_modifiers, avg 12µs/call
76 |  |  |  |  |
77 | 26 | 67µs | 26 | 3.91ms | $self->apply_before_method_modifiers(@_); # spent 3.91ms making 26 calls to Moose::Meta::Role::Application::apply_before_method_modifiers, avg 150µs/call
78 | 26 | 64µs | 26 | 3.60ms | $self->apply_around_method_modifiers(@_); # spent 3.60ms making 26 calls to Moose::Meta::Role::Application::apply_around_method_modifiers, avg 138µs/call
79 | 26 | 103µs | 26 | 5.16ms | $self->apply_after_method_modifiers(@_); # spent 5.16ms making 26 calls to Moose::Meta::Role::Application::apply_after_method_modifiers, avg 198µs/call
80 |  |  |  |  | }
81 |  |  |  |  |
82 |  |  |  |  | sub check_role_exclusions { Carp::croak "Abstract Method" }
83 |  |  |  |  | sub check_required_methods { Carp::croak "Abstract Method" }
84 |  |  |  |  | sub check_required_attributes { Carp::croak "Abstract Method" }
85 |  |  |  |  |
86 |  |  |  |  | sub apply_attributes { Carp::croak "Abstract Method" }
87 |  |  |  |  | sub apply_methods { Carp::croak "Abstract Method" }
88 |  |  |  |  | sub apply_override_method_modifiers { Carp::croak "Abstract Method" }
89 |  |  |  |  | sub apply_method_modifiers { Carp::croak "Abstract Method" }
90 |  |  |  |  |
91 | 26 | 103µs | 26 | 3.80ms | # spent 3.91ms (114µs+3.80) within Moose::Meta::Role::Application::apply_before_method_modifiers which was called 26 times, avg 150µs/call: # 26 times (114µs+3.80ms) by Moose::Meta::Role::Application::apply at line 77, avg 150µs/call sub apply_before_method_modifiers { (shift)->apply_method_modifiers('before' => @_) } # spent 3.38ms making 13 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 260µs/call # spent 421µs making 13 calls to Moose::Meta::Role::Application::ToRole::apply_method_modifiers, avg 32µs/call
92 | 26 | 69µs | 26 | 3.50ms | # spent 3.60ms (95µs+3.50) within Moose::Meta::Role::Application::apply_around_method_modifiers which was called 26 times, avg 138µs/call: # 26 times (95µs+3.50ms) by Moose::Meta::Role::Application::apply at line 78, avg 138µs/call sub apply_around_method_modifiers { (shift)->apply_method_modifiers('around' => @_) } # spent 3.38ms making 13 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 260µs/call # spent 126µs making 13 calls to Moose::Meta::Role::Application::ToRole::apply_method_modifiers, avg 10µs/call
93 | 26 | 84µs | 26 | 5.06ms | # spent 5.16ms (99µs+5.06) within Moose::Meta::Role::Application::apply_after_method_modifiers which was called 26 times, avg 198µs/call: # 26 times (99µs+5.06ms) by Moose::Meta::Role::Application::apply at line 79, avg 198µs/call sub apply_after_method_modifiers { (shift)->apply_method_modifiers('after' => @_) } # spent 4.49ms making 13 calls to Moose::Meta::Role::Application::ToClass::apply_method_modifiers, avg 345µs/call # spent 573µs making 13 calls to Moose::Meta::Role::Application::ToRole::apply_method_modifiers, avg 44µs/call
94 |  |  |  |  |
95 | 1 | 12µs |  |  | 1;
96 |  |  |  |  |
97 |  |  |  |  | __END__
98 |  |  |  |  |
99 |  |  |  |  | =pod
100 |  |  |  |  |
101 |  |  |  |  | =head1 NAME
102 |  |  |  |  |
103 |  |  |  |  | Moose::Meta::Role::Application - A base class for role application
104 |  |  |  |  |
105 |  |  |  |  | =head1 DESCRIPTION
106 |  |  |  |  |
107 |  |  |  |  | This is the abstract base class for role applications.
108 |  |  |  |  |
109 |  |  |  |  | The API for this class and its subclasses still needs some
110 |  |  |  |  | consideration, and is intentionally not yet documented.
111 |  |  |  |  |
112 |  |  |  |  | =head2 METHODS
113 |  |  |  |  |
114 |  |  |  |  | =over 4
115 |  |  |  |  |
116 |  |  |  |  | =item B<new>
117 |  |  |  |  |
118 |  |  |  |  | =item B<meta>
119 |  |  |  |  |
120 |  |  |  |  | =item B<get_method_exclusions>
121 |  |  |  |  |
122 |  |  |  |  | =item B<is_method_excluded>
123 |  |  |  |  |
124 |  |  |  |  | =item B<get_method_aliases>
125 |  |  |  |  |
126 |  |  |  |  | =item B<is_aliased_method>
127 |  |  |  |  |
128 |  |  |  |  | =item B<is_method_aliased>
129 |  |  |  |  |
130 |  |  |  |  | =item B<apply>
131 |  |  |  |  |
132 |  |  |  |  | =item B<check_role_exclusions>
133 |  |  |  |  |
134 |  |  |  |  | =item B<check_required_methods>
135 |  |  |  |  |
136 |  |  |  |  | =item B<check_required_attributes>
137 |  |  |  |  |
138 |  |  |  |  | =item B<apply_attributes>
139 |  |  |  |  |
140 |  |  |  |  | =item B<apply_methods>
141 |  |  |  |  |
142 |  |  |  |  | =item B<apply_method_modifiers>
143 |  |  |  |  |
144 |  |  |  |  | =item B<apply_before_method_modifiers>
145 |  |  |  |  |
146 |  |  |  |  | =item B<apply_after_method_modifiers>
147 |  |  |  |  |
148 |  |  |  |  | =item B<apply_around_method_modifiers>
149 |  |  |  |  |
150 |  |  |  |  | =item B<apply_override_method_modifiers>
151 |  |  |  |  |
152 |  |  |  |  | =back
153 |  |  |  |  |
154 |  |  |  |  | =head1 BUGS
155 |  |  |  |  |
156 |  |  |  |  | See L<Moose/BUGS> for details on reporting bugs.
157 |  |  |  |  |
158 |  |  |  |  | =head1 AUTHOR
159 |  |  |  |  |
160 |  |  |  |  | Stevan Little E<lt>stevan@iinteractive.comE<gt>
161 |  |  |  |  |
162 |  |  |  |  | =head1 COPYRIGHT AND LICENSE
163 |  |  |  |  |
164 |  |  |  |  | Copyright 2006-2010 by Infinity Interactive, Inc.
165 |  |  |  |  |
166 |  |  |  |  | L<http://www.iinteractive.com>
167 |  |  |  |  |
168 |  |  |  |  | This library is free software; you can redistribute it and/or modify
169 |  |  |  |  | it under the same terms as Perl itself.
170 |  |  |  |  |
171 |  |  |  |  | =cut
172 |  |  |  |  |