← Index
NYTProf Performance Profile   « line view »
For /home/ss5/perl5/perlbrew/perls/perl-5.22.0/bin/benchmarkanything-storage
  Run on Mon Jan 29 16:55:34 2018
Reported on Mon Jan 29 16:57:07 2018

Filename/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Method/Generate/BuildAll.pm
StatementsExecuted 20 statements in 316µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
21122µs27µsMethod::Generate::BuildAll::::buildall_body_forMethod::Generate::BuildAll::buildall_body_for
11110µs25µsMethod::Generate::BuildAll::::BEGIN@3Method::Generate::BuildAll::BEGIN@3
1116µs31µsMethod::Generate::BuildAll::::BEGIN@6Method::Generate::BuildAll::BEGIN@6
1116µs46µsMethod::Generate::BuildAll::::BEGIN@7Method::Generate::BuildAll::BEGIN@7
1112µs2µsMethod::Generate::BuildAll::::BEGIN@4Method::Generate::BuildAll::BEGIN@4
0000s0sMethod::Generate::BuildAll::::_handle_subbuildMethod::Generate::BuildAll::_handle_subbuild
0000s0sMethod::Generate::BuildAll::::generate_methodMethod::Generate::BuildAll::generate_method
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Method::Generate::BuildAll;
2
3220µs240µs
# spent 25µs (10+15) within Method::Generate::BuildAll::BEGIN@3 which was called: # once (10µs+15µs) by Method::Generate::Constructor::buildall_generator at line 3
use Moo::_strictures;
# spent 25µs making 1 call to Method::Generate::BuildAll::BEGIN@3 # spent 15µs making 1 call to Moo::_strictures::import
4223µs12µs
# spent 2µs within Method::Generate::BuildAll::BEGIN@4 which was called: # once (2µs+0s) by Method::Generate::Constructor::buildall_generator at line 4
use Moo::Object ();
# spent 2µs making 1 call to Method::Generate::BuildAll::BEGIN@4
514µsour @ISA = qw(Moo::Object);
6220µs257µs
# spent 31µs (6+26) within Method::Generate::BuildAll::BEGIN@6 which was called: # once (6µs+26µs) by Method::Generate::Constructor::buildall_generator at line 6
use Sub::Quote qw(quote_sub quotify);
# spent 31µs making 1 call to Method::Generate::BuildAll::BEGIN@6 # spent 26µs making 1 call to Exporter::import
72215µs286µs
# spent 46µs (6+40) within Method::Generate::BuildAll::BEGIN@7 which was called: # once (6µs+40µs) by Method::Generate::Constructor::buildall_generator at line 7
use Moo::_Utils;
# spent 46µs making 1 call to Method::Generate::BuildAll::BEGIN@7 # spent 40µs making 1 call to Exporter::import
8
9sub generate_method {
10 my ($self, $into) = @_;
11 quote_sub "${into}::BUILDALL", join '',
12 $self->_handle_subbuild($into),
13 qq{ my \$self = shift;\n},
14 $self->buildall_body_for($into, '$self', '@_'),
15 qq{ return \$self\n};
16}
17
18sub _handle_subbuild {
19 my ($self, $into) = @_;
20 ' if (ref($_[0]) ne '.quotify($into).') {'."\n".
21 ' return shift->Moo::Object::BUILDALL(@_)'.";\n".
22 ' }'."\n";
23}
24
25
# spent 27µs (22+6) within Method::Generate::BuildAll::buildall_body_for which was called 2 times, avg 14µs/call: # 2 times (22µs+6µs) by Method::Generate::Constructor::generate_method at line 140 of Method/Generate/Constructor.pm, avg 14µs/call
sub buildall_body_for {
2621µs my ($self, $into, $me, $args) = @_;
27 my @builds =
2842µs45µs grep *{_getglob($_)}{CODE},
# spent 5µs making 4 calls to Moo::_Utils::_getglob, avg 1µs/call
29 map "${_}::BUILD",
30210µs21µs reverse @{mro::get_linear_isa($into)};
# spent 1µs making 2 calls to mro::get_linear_isa, avg 500ns/call
31218µs ' unless (('.$args.')[0]->{__no_BUILD__}) {'."\n"
32 .join('', map qq{ ${me}->${_}(${args});\n}, @builds)
33 ." }\n";
34}
35
3612µs1;