← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 10:04:38 2014
Reported on Tue Jun 24 10:05:15 2014

Filename/usr/local/lib/perl/5.14.2/Class/MOP/Method/Generated.pm
StatementsExecuted 3150 statements in 4.79ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
196742.49ms60.7msClass::MOP::Method::Generated::::_compile_codeClass::MOP::Method::Generated::_compile_code
196111.48ms1.61msClass::MOP::Method::Generated::::_generate_descriptionClass::MOP::Method::Generated::_generate_description
1111.12ms1.34msClass::MOP::Method::Generated::::BEGIN@14Class::MOP::Method::Generated::BEGIN@14
1118µs8µsClass::MOP::Method::Generated::::BEGIN@3Class::MOP::Method::Generated::BEGIN@3
1118µs49µsClass::MOP::Method::Generated::::BEGIN@16Class::MOP::Method::Generated::BEGIN@16
1117µs10µsClass::MOP::Method::Generated::::BEGIN@10Class::MOP::Method::Generated::BEGIN@10
1116µs11µsClass::MOP::Method::Generated::::BEGIN@11Class::MOP::Method::Generated::BEGIN@11
1116µs36µsClass::MOP::Method::Generated::::BEGIN@13Class::MOP::Method::Generated::BEGIN@13
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
1
2package Class::MOP::Method::Generated;
3
# spent 8µs within Class::MOP::Method::Generated::BEGIN@3 which was called: # once (8µs+0s) by base::import at line 5
BEGIN {
415µs $Class::MOP::Method::Generated::AUTHORITY = 'cpan:STEVAN';
5134µs18µs}
# spent 8µs making 1 call to Class::MOP::Method::Generated::BEGIN@3
6{
721µs $Class::MOP::Method::Generated::VERSION = '2.1005';
8}
9
10221µs213µs
# spent 10µs (7+3) within Class::MOP::Method::Generated::BEGIN@10 which was called: # once (7µs+3µs) by base::import at line 10
use strict;
# spent 10µs making 1 call to Class::MOP::Method::Generated::BEGIN@10 # spent 3µs making 1 call to strict::import
11221µs216µs
# spent 11µs (6+5) within Class::MOP::Method::Generated::BEGIN@11 which was called: # once (6µs+5µs) by base::import at line 11
use warnings;
# spent 11µs making 1 call to Class::MOP::Method::Generated::BEGIN@11 # spent 5µs making 1 call to warnings::import
12
13223µs266µs
# spent 36µs (6+30) within Class::MOP::Method::Generated::BEGIN@13 which was called: # once (6µs+30µs) by base::import at line 13
use Carp 'confess';
# spent 36µs making 1 call to Class::MOP::Method::Generated::BEGIN@13 # spent 30µs making 1 call to Exporter::import
142107µs21.37ms
# spent 1.34ms (1.12+223µs) within Class::MOP::Method::Generated::BEGIN@14 which was called: # once (1.12ms+223µs) by base::import at line 14
use Eval::Closure;
# spent 1.34ms making 1 call to Class::MOP::Method::Generated::BEGIN@14 # spent 26µs making 1 call to Exporter::import
15
162235µs249µs
# spent 49µs (8+41) within Class::MOP::Method::Generated::BEGIN@16 which was called: # once (8µs+41µs) by base::import at line 16
use base 'Class::MOP::Method';
# spent 49µs making 1 call to Class::MOP::Method::Generated::BEGIN@16 # spent 41µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 41µs
17
18## accessors
19
20sub new {
21 confess __PACKAGE__ . " is an abstract base class, you must provide a constructor.";
22}
23
24sub _initialize_body {
25 confess "No body to initialize, " . __PACKAGE__ . " is an abstract base class";
26}
27
28
# spent 1.61ms (1.48+129µs) within Class::MOP::Method::Generated::_generate_description which was called 196 times, avg 8µs/call: # 196 times (1.48ms+129µs) by Class::MOP::Method::Generated::_compile_code at line 63, avg 8µs/call
sub _generate_description {
2911761.27ms my ( $self, $context ) = @_;
30196129µs $context ||= $self->definition_context;
# spent 129µs making 196 calls to Class::MOP::Method::Generated::definition_context, avg 659ns/call
31
32 my $desc = "generated method";
33 my $origin = "unknown origin";
34
35392162µs if (defined $context) {
3619670µs if (defined $context->{description}) {
37 $desc = $context->{description};
38 }
39
40196287µs if (defined $context->{file} || defined $context->{line}) {
41 $origin = "defined at "
42 . (defined $context->{file}
43 ? $context->{file} : "<unknown file>")
44 . " line "
45 . (defined $context->{line}
46 ? $context->{line} : "<unknown line>");
47 }
48 }
49
50 return "$desc ($origin)";
51}
52
53
# spent 60.7ms (2.49+58.2) within Class::MOP::Method::Generated::_compile_code which was called 196 times, avg 310µs/call: # 64 times (865µs+19.5ms) by Moose::Meta::Method::Accessor::try {...} at line 38 of Moose/Meta/Method/Accessor.pm, avg 318µs/call # 53 times (603µs+7.52ms) by Class::MOP::Method::Accessor::try {...} at line 142 of Class/MOP/Method/Accessor.pm, avg 153µs/call # 35 times (506µs+25.2ms) by Class::MOP::Method::Constructor::try {...} at line 110 of Class/MOP/Method/Constructor.pm, avg 734µs/call # 22 times (259µs+3.20ms) by Class::MOP::Method::Accessor::try {...} at line 112 of Class/MOP/Method/Accessor.pm, avg 157µs/call # 16 times (179µs+2.02ms) by Class::MOP::Method::Accessor::try {...} at line 204 of Class/MOP/Method/Accessor.pm, avg 137µs/call # 3 times (40µs+427µs) by Moose::Meta::Method::Destructor::try {...} at line 97 of Moose/Meta/Method/Destructor.pm, avg 156µs/call # 3 times (33µs+366µs) by Class::MOP::Method::Accessor::try {...} at line 179 of Class/MOP/Method/Accessor.pm, avg 133µs/call
sub _compile_code {
5411762.55ms my ( $self, @args ) = @_;
55 unshift @args, 'source' if @args % 2;
56 my %args = @args;
57
58 my $context = delete $args{context};
5929512.6ms my $environment = $self->can('_eval_environment')
# spent 8.06ms making 35 calls to Class::MOP::Method::Constructor::_eval_environment, avg 230µs/call # spent 4.30ms making 64 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 67µs/call # spent 238µs making 196 calls to UNIVERSAL::can, avg 1µs/call
60 ? $self->_eval_environment
61 : {};
62
6339245.6ms return eval_closure(
# spent 44.0ms making 196 calls to Eval::Closure::eval_closure, avg 224µs/call # spent 1.61ms making 196 calls to Class::MOP::Method::Generated::_generate_description, avg 8µs/call
64 environment => $environment,
65 description => $self->_generate_description($context),
66 %args,
67 );
68}
69
7012µs1;
71
72# ABSTRACT: Abstract base class for generated methods
73
74__END__