← 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:06 2018

Filename/home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/Class/MOP/Method/Generated.pm
StatementsExecuted 1844 statements in 1.98ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
131741.04ms25.6msClass::MOP::Method::Generated::::_compile_codeClass::MOP::Method::Generated::_compile_code
111756µs925µsClass::MOP::Method::Generated::::BEGIN@7Class::MOP::Method::Generated::BEGIN@7
13111575µs613µsClass::MOP::Method::Generated::::_generate_descriptionClass::MOP::Method::Generated::_generate_description
11111µs13µsClass::MOP::Method::Generated::::BEGIN@4Class::MOP::Method::Generated::BEGIN@4
1117µs25µsClass::MOP::Method::Generated::::BEGIN@9Class::MOP::Method::Generated::BEGIN@9
1115µs10µsClass::MOP::Method::Generated::::BEGIN@5Class::MOP::Method::Generated::BEGIN@5
0000s0sClass::MOP::Method::Generated::::_initialize_bodyClass::MOP::Method::Generated::_initialize_body
0000s0sClass::MOP::Method::Generated::::newClass::MOP::Method::Generated::new
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Class::MOP::Method::Generated;
21200nsour $VERSION = '2.1605';
3
4215µs216µs
# spent 13µs (11+3) within Class::MOP::Method::Generated::BEGIN@4 which was called: # once (11µs+3µs) by parent::import at line 4
use strict;
# spent 13µs making 1 call to Class::MOP::Method::Generated::BEGIN@4 # spent 3µs making 1 call to strict::import
5216µs216µs
# spent 10µs (5+6) within Class::MOP::Method::Generated::BEGIN@5 which was called: # once (5µs+6µs) by parent::import at line 5
use warnings;
# spent 10µs making 1 call to Class::MOP::Method::Generated::BEGIN@5 # spent 6µs making 1 call to warnings::import
6
7271µs2944µs
# spent 925µs (756+169) within Class::MOP::Method::Generated::BEGIN@7 which was called: # once (756µs+169µs) by parent::import at line 7
use Eval::Closure;
# spent 925µs making 1 call to Class::MOP::Method::Generated::BEGIN@7 # spent 19µs making 1 call to Exporter::import
8
92152µs225µs
# spent 25µs (7+18) within Class::MOP::Method::Generated::BEGIN@9 which was called: # once (7µs+18µs) by parent::import at line 9
use parent 'Class::MOP::Method';
# spent 25µs making 1 call to Class::MOP::Method::Generated::BEGIN@9 # spent 18µs making 1 call to parent::import, recursion: max depth 1, sum of overlapping time 18µs
10
11## accessors
12
13sub new {
14 $_[0]->_throw_exception( CannotCallAnAbstractBaseMethod => package_name => __PACKAGE__ );
15}
16
17sub _initialize_body {
18 $_[0]->_throw_exception( NoBodyToInitializeInAnAbstractBaseClass => package_name => __PACKAGE__ );
19}
20
21
# spent 613µs (575+38) within Class::MOP::Method::Generated::_generate_description which was called 131 times, avg 5µs/call: # 131 times (575µs+38µs) by Class::MOP::Method::Generated::_compile_code at line 56, avg 5µs/call
sub _generate_description {
2213123µs my ( $self, $context ) = @_;
23131205µs13138µs $context ||= $self->definition_context;
# spent 38µs making 131 calls to Class::MOP::Method::Generated::definition_context, avg 289ns/call
24
2513123µs my $desc = "generated method";
2613111µs my $origin = "unknown origin";
27
2813130µs if (defined $context) {
2913149µs if (defined $context->{description}) {
30 $desc = $context->{description};
31 }
32
33131155µs if (defined $context->{file} || defined $context->{line}) {
34 $origin = "defined at "
35 . (defined $context->{file}
36 ? $context->{file} : "<unknown file>")
37 . " line "
38 . (defined $context->{line}
39 ? $context->{line} : "<unknown line>");
40 }
41 }
42
43131179µs return "$desc ($origin)";
44}
45
46
# spent 25.6ms (1.04+24.5) within Class::MOP::Method::Generated::_compile_code which was called 131 times, avg 195µs/call: # 54 times (367µs+8.97ms) by Class::MOP::Method::Accessor::try {...} at line 151 of Class/MOP/Method/Accessor.pm, avg 173µs/call # 31 times (310µs+10.5ms) by Class::MOP::Method::Constructor::try {...} at line 107 of Class/MOP/Method/Constructor.pm, avg 349µs/call # 21 times (158µs+1.99ms) by Class::MOP::Method::Accessor::try {...} at line 113 of Class/MOP/Method/Accessor.pm, avg 102µs/call # 15 times (110µs+1.17ms) by Class::MOP::Method::Accessor::try {...} at line 219 of Class/MOP/Method/Accessor.pm, avg 86µs/call # 6 times (70µs+1.57ms) by Moose::Meta::Method::Accessor::try {...} at line 34 of Moose/Meta/Method/Accessor.pm, avg 273µs/call # 3 times (20µs+230µs) by Class::MOP::Method::Accessor::try {...} at line 191 of Class/MOP/Method/Accessor.pm, avg 83µs/call # once (9µs+92µs) by Moose::Meta::Method::Destructor::try {...} at line 92 of Moose/Meta/Method/Destructor.pm
sub _compile_code {
4713133µs my ( $self, @args ) = @_;
48131103µs unshift @args, 'source' if @args % 2;
4913186µs my %args = @args;
50
5113140µs my $context = delete $args{context};
52131324µs1683.71ms my $environment = $self->can('_eval_environment')
# spent 3.26ms making 31 calls to Class::MOP::Method::Constructor::_eval_environment, avg 105µs/call # spent 359µs making 6 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 60µs/call # spent 87µs making 131 calls to UNIVERSAL::can, avg 663ns/call
53 ? $self->_eval_environment
54 : {};
55
56131459µs26220.8ms return eval_closure(
# spent 20.2ms making 131 calls to Eval::Closure::eval_closure, avg 154µs/call # spent 613µs making 131 calls to Class::MOP::Method::Generated::_generate_description, avg 5µs/call
57 environment => $environment,
58 description => $self->_generate_description($context),
59 %args,
60 );
61}
62
6312µs1;
64
65# ABSTRACT: Abstract base class for generated methods
66
67__END__