← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/bin/epoll_server.pl
  Run on Wed Jan 5 05:34:33 2011
Reported on Wed Jan 5 05:40:44 2011

File /usr/lib/perl5/vendor_perl/5.10.0/B/Hooks/EndOfScope.pm
Statements Executed 419
Statement Execution Time 7.85ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1112.64ms4.45msB::Hooks::EndOfScope::::BEGIN@7B::Hooks::EndOfScope::BEGIN@7
50332.14ms4.13msB::Hooks::EndOfScope::::on_scope_endB::Hooks::EndOfScope::on_scope_end
5050491.55ms217msB::Hooks::EndOfScope::::__ANON__[:47]B::Hooks::EndOfScope::__ANON__[:47]
5011489µs489µsB::Hooks::EndOfScope::::__ANON__[:46]B::Hooks::EndOfScope::__ANON__[:46]
111250µs250µsB::Hooks::EndOfScope::::BEGIN@6B::Hooks::EndOfScope::BEGIN@6
11151µs63µsnamespace::clean::::BEGIN@1 namespace::clean::BEGIN@1
11145µs1.52msB::Hooks::EndOfScope::::BEGIN@11B::Hooks::EndOfScope::BEGIN@11
11129µs84µsnamespace::clean::::BEGIN@2 namespace::clean::BEGIN@2
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1380µs275µs
# spent 63µs (51+12) within namespace::clean::BEGIN@1 which was called # once (51µs+12µs) by namespace::clean::BEGIN@14 at line 1
use strict;
# spent 63µs making 1 call to namespace::clean::BEGIN@1 # spent 12µs making 1 call to strict::import
2396µs2139µs
# spent 84µs (29+55) within namespace::clean::BEGIN@2 which was called # once (29µs+55µs) by namespace::clean::BEGIN@14 at line 2
use warnings;
# spent 84µs making 1 call to namespace::clean::BEGIN@2 # spent 55µs making 1 call to warnings::import
3
4package B::Hooks::EndOfScope;
5
63379µs1250µs
# spent 250µs within B::Hooks::EndOfScope::BEGIN@6 which was called # once (250µs+0s) by namespace::clean::BEGIN@14 at line 6
use 5.008000;
# spent 250µs making 1 call to B::Hooks::EndOfScope::BEGIN@6
73602µs24.53ms
# spent 4.45ms (2.64+1.82) within B::Hooks::EndOfScope::BEGIN@7 which was called # once (2.64ms+1.82ms) by namespace::clean::BEGIN@14 at line 7
use Variable::Magic;
# spent 4.45ms making 1 call to B::Hooks::EndOfScope::BEGIN@7 # spent 76µs making 1 call to Exporter::import
8
914µsour $VERSION = '0.08';
10
11132µs11.47ms
# spent 1.52ms (45µs+1.47) within B::Hooks::EndOfScope::BEGIN@11 which was called # once (45µs+1.47ms) by namespace::clean::BEGIN@14 at line 14
use Sub::Exporter -setup => {
# spent 1.47ms making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756]
12 exports => ['on_scope_end'],
13 groups => { default => ['on_scope_end'] },
142682µs11.52ms};
# spent 1.52ms making 1 call to B::Hooks::EndOfScope::BEGIN@11
15
16=head1 NAME
17
18B::Hooks::EndOfScope - Execute code after a scope finished compilation
19
20=head1 SYNOPSIS
21
22 on_scope_end { ... };
23
24=head1 DESCRIPTION
25
26This module allows you to execute code when perl finished compiling the
27surrounding scope.
28
29=head1 FUNCTIONS
30
31=head2 on_scope_end
32
33 on_scope_end { ... };
34
35 on_scope_end $code;
36
37Registers C<$code> to be executed after the surrounding scope has been
38compiled.
39
40This is exported by default. See L<Sub::Exporter> on how to customize it.
41
42=cut
43
44{
4514µs my $wiz = Variable::Magic::wizard
4650667µs
# spent 489µs within B::Hooks::EndOfScope::__ANON__[/usr/lib/perl5/vendor_perl/5.10.0/B/Hooks/EndOfScope.pm:46] which was called 50 times, avg 10µs/call: # 50 times (489µs+0s) by Variable::Magic::cast at line 58, avg 10µs/call
data => sub { [$_[1]] },
471511.85ms51216ms
# spent 217ms (1.55+216) within B::Hooks::EndOfScope::__ANON__[/usr/lib/perl5/vendor_perl/5.10.0/B/Hooks/EndOfScope.pm:47] which was called 50 times, avg 4.34ms/call: # once (30µs+23.8ms) by main::RUNTIME at line 56 of /usr/bin/epoll_server.pl # once (32µs+15.6ms) by main::BEGIN@6 at line 578 of Catalyst/Engine/HTTP.pm # once (31µs+14.1ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 144 of Catalyst/Plugin/Session/State/Cookie.pm # once (33µs+12.6ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 259 of Catalyst/Plugin/Static/Simple.pm # once (32µs+10.7ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 70 of MooseX/Role/WithOverloading/Meta/Role/Application.pm # once (50µs+8.48ms) by MooseX::Role::WithOverloading::Meta::Role::Composite::BEGIN@1 at line 12 of MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToClass.pm # once (31µs+8.45ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 16 of MooseX/Role/WithOverloading/Meta/Role/Application/FixOverloadedRefs.pm # once (30µs+8.36ms) by MooseX::Role::WithOverloading::Meta::Role::Application::ToRole::BEGIN@1 at line 12 of MooseX/Role/WithOverloading/Meta/Role/Application/ToClass.pm # once (30µs+8.09ms) by MooseX::Role::WithOverloading::Meta::Role::BEGIN@1 at line 26 of MooseX/Role/WithOverloading/Meta/Role/Composite.pm # once (31µs+8.07ms) by MooseX::Role::WithOverloading::Meta::Role::Composite::BEGIN@1 at line 15 of MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToInstance.pm # once (31µs+7.72ms) by MooseX::Role::WithOverloading::Meta::Role::Application::ToRole::BEGIN@1 at line 15 of MooseX/Role/WithOverloading/Meta/Role/Application/ToInstance.pm # once (124µs+6.45ms) by MooseX::Role::WithOverloading::Meta::Role::Composite::BEGIN@1 at line 15 of MooseX/Role/WithOverloading/Meta/Role/Application/Composite/ToRole.pm # once (34µs+6.44ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 41 of MooseX/MethodAttributes/Role/Meta/Map.pm # once (23µs+5.52ms) by MooseX::Role::WithOverloading::BEGIN@1 at line 22 of MooseX/Role/WithOverloading/Meta/Role.pm # once (21µs+5.37ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 19 of MooseX/Role/WithOverloading/Meta/Role/Application/Composite.pm # once (21µs+4.51ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 27 of MooseX/Role/WithOverloading/Meta/Role/Application/ToRole.pm # once (33µs+4.04ms) by MooseX::Types::Moose::BEGIN@13 at line 611 of MooseX/Types.pm # once (32µs+3.22ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 49 of MooseX/MethodAttributes/Role/Meta/Role/Application.pm # once (29µs+3.14ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 14 of Catalyst/Exception/Interface.pm # once (31µs+2.47ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 160 of Catalyst/Component.pm # once (22µs+2.47ms) by MooseX::Types::BEGIN@12 at line 291 of MooseX/Types/Base.pm # once (31µs+2.45ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 91 of MooseX/MethodAttributes/Role/Meta/Class.pm # once (33µs+2.44ms) by Catalyst::Plugin::ConfigLoader::BEGIN@8 at line 287 of Data/Visitor/Callback.pm # once (32µs+2.43ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 25 of MooseX/MethodAttributes/Role/Meta/Method/MaybeWrapped.pm # once (33µs+2.41ms) by Data::Visitor::Callback::BEGIN@6 at line 447 of Data/Visitor.pm # once (30µs+2.31ms) by MooseX::MethodAttributes::Role::Meta::Method::MaybeWrapped::BEGIN@7 at line 22 of MooseX/MethodAttributes/Role/Meta/Method/Wrapped.pm # once (29µs+2.27ms) by Catalyst::BEGIN@8 at line 68 of Catalyst/Exception.pm # once (30µs+2.21ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 19 of MooseX/MethodAttributes/Role/AttrContainer.pm # once (31µs+2.19ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 22 of MooseX/MethodAttributes/Role/AttrContainer/Inheritable.pm # once (33µs+2.17ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 595 of Catalyst/Plugin/Session.pm # once (32µs+2.17ms) by MooseX::Role::WithOverloading::Meta::Role::Application::BEGIN@7 at line 84 of MooseX/Types/Moose.pm # once (33µs+2.15ms) by MooseX::MethodAttributes::Inheritable::BEGIN@7 at line 75 of MooseX/MethodAttributes/Role/Meta/Role.pm # once (32µs+2.14ms) by Catalyst::Utils::ensure_class_loaded at line 167 of Catalyst/Stats.pm # once (31µs+2.01ms) by Catalyst::Dispatcher::BEGIN@9 at line 95 of Catalyst/Action.pm # once (37µs+1.81ms) by Catalyst::BEGIN@16 at line 429 of Catalyst/Controller.pm # once (30µs+1.71ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 18 of MooseX/MethodAttributes/Inheritable.pm # once (30µs+1.69ms) by Catalyst::BEGIN@9 at line 16 of Catalyst/Exception/Detach.pm # once (28µs+1.66ms) by Catalyst::BEGIN@8 at line 53 of Catalyst/Exception.pm # once (33µs+1.44ms) by Catalyst::Dispatcher::BEGIN@12 at line 107 of Catalyst/DispatchType/Index.pm # once (20µs+1.10ms) by Catalyst::BEGIN@12 at line 702 of Catalyst/Request.pm # once (20µs+1.09ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 107 of Catalyst/Exception/Basic.pm # once (15µs+986µs) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 29 of MooseX/MethodAttributes/Role/Meta/Method.pm # once (15µs+986µs) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 22 of Catalyst/Component/ApplicationAttribute.pm # once (19µs+967µs) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 729 of Catalyst/Engine.pm # once (36µs+904µs) by Catalyst::BEGIN@15 at line 421 of Catalyst/Utils.pm # once (17µs+785µs) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 766 of Catalyst/Dispatcher.pm # once (14µs+671µs) by Catalyst::BEGIN@10 at line 16 of Catalyst/Exception/Go.pm # once (31µs+329µs) by MooseX::Role::WithOverloading::Meta::Role::Application::Composite::ToClass::BEGIN@6 at line 58 of namespace/autoclean.pm # once (50µs+251µs) by MooseX::Types::BEGIN@15 at line 102 of MooseX/Types/CheckedUtilExports.pm # once (14µs+271µs) by Catalyst::Exception::Basic::BEGIN@3 at line 36 of MooseX/Role/WithOverloading.pm
free => sub { $_->() for @{ $_[1] }; () };
# spent 108ms making 13 calls to namespace::autoclean::__ANON__[namespace/autoclean.pm:53], avg 8.34ms/call # spent 83.4ms making 36 calls to namespace::clean::__ANON__[namespace/clean.pm:275], avg 2.32ms/call # spent 23.8ms making 1 call to Catalyst::__ANON__[Catalyst.pm:1189] # spent 275µs making 1 call to Variable::Magic::wizard
48
49
# spent 4.13ms (2.14+1.99) within B::Hooks::EndOfScope::on_scope_end which was called 50 times, avg 83µs/call: # 36 times (1.49ms+1.47ms) by namespace::clean::import at line 275 of namespace/clean.pm, avg 82µs/call # 13 times (563µs+487µs) by namespace::autoclean::import at line 53 of namespace/autoclean.pm, avg 81µs/call # once (91µs+37µs) by Catalyst::setup at line 1189 of Catalyst.pm
sub on_scope_end (&) {
5050211µs my $cb = shift;
51
5250329µs $^H |= 0x020000;
53
54501.52ms50486µs if (my $stack = Variable::Magic::getdata %^H, $wiz) {
# spent 486µs making 50 calls to Variable::Magic::getdata, avg 10µs/call
55 push @{ $stack }, $cb;
56 }
57 else {
58501.38ms1002.00ms Variable::Magic::cast %^H, $wiz, $cb;
# spent 1.51ms making 50 calls to Variable::Magic::cast, avg 30µs/call # spent 489µs making 50 calls to B::Hooks::EndOfScope::__ANON__[B/Hooks/EndOfScope.pm:46], avg 10µs/call
59 }
60 }
61}
62
63=head1 SEE ALSO
64
65L<Sub::Exporter>
66
67L<Variable::Magic>
68
69=head1 AUTHOR
70
71Florian Ragwitz E<lt>rafl@debian.orgE<gt>
72
73=head1 COPYRIGHT AND LICENSE
74
75Copyright (c) 2008 Florian Ragwitz
76
77This module is free software.
78
79You may distribute this code under the same terms as Perl itself.
80
81=cut
82
83114µs1;