← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:40 2014

Filename/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Class/MOP/Method/Generated.pm
StatementsExecuted 1820 statements in 3.77ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
129741.96ms51.3msClass::MOP::Method::Generated::::_compile_codeClass::MOP::Method::Generated::_compile_code
1111.58ms1.89msClass::MOP::Method::Generated::::BEGIN@14Class::MOP::Method::Generated::BEGIN@14
129111.13ms1.22msClass::MOP::Method::Generated::::_generate_descriptionClass::MOP::Method::Generated::_generate_description
11111µs11µsClass::MOP::Method::Generated::::BEGIN@3Class::MOP::Method::Generated::BEGIN@3
11110µs81µsClass::MOP::Method::Generated::::BEGIN@16Class::MOP::Method::Generated::BEGIN@16
11110µs14µsClass::MOP::Method::Generated::::BEGIN@11Class::MOP::Method::Generated::BEGIN@11
1119µs39µsClass::MOP::Method::Generated::::BEGIN@13Class::MOP::Method::Generated::BEGIN@13
1118µs24µsClass::MOP::Method::Generated::::BEGIN@10Class::MOP::Method::Generated::BEGIN@10
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 11µs within Class::MOP::Method::Generated::BEGIN@3 which was called: # once (11µs+0s) by base::import at line 5
BEGIN {
4111µs $Class::MOP::Method::Generated::AUTHORITY = 'cpan:STEVAN';
5147µs111µs}
# spent 11µs making 1 call to Class::MOP::Method::Generated::BEGIN@3
6{
721µs $Class::MOP::Method::Generated::VERSION = '2.1005';
8}
9
10236µs239µs
# spent 24µs (8+15) within Class::MOP::Method::Generated::BEGIN@10 which was called: # once (8µs+15µs) by base::import at line 10
use strict;
# spent 24µs making 1 call to Class::MOP::Method::Generated::BEGIN@10 # spent 15µs making 1 call to strict::import
11233µs219µs
# spent 14µs (10+5) within Class::MOP::Method::Generated::BEGIN@11 which was called: # once (10µs+5µs) by base::import at line 11
use warnings;
# spent 14µs making 1 call to Class::MOP::Method::Generated::BEGIN@11 # spent 5µs making 1 call to warnings::import
12
13232µs269µs
# spent 39µs (9+30) within Class::MOP::Method::Generated::BEGIN@13 which was called: # once (9µs+30µs) by base::import at line 13
use Carp 'confess';
# spent 39µs making 1 call to Class::MOP::Method::Generated::BEGIN@13 # spent 30µs making 1 call to Exporter::import
142149µs21.92ms
# spent 1.89ms (1.58+300µs) within Class::MOP::Method::Generated::BEGIN@14 which was called: # once (1.58ms+300µs) by base::import at line 14
use Eval::Closure;
# spent 1.89ms making 1 call to Class::MOP::Method::Generated::BEGIN@14 # spent 34µs making 1 call to Exporter::import
15
162342µs281µs
# spent 81µs (10+72) within Class::MOP::Method::Generated::BEGIN@16 which was called: # once (10µs+72µs) by base::import at line 16
use base 'Class::MOP::Method';
# spent 81µs making 1 call to Class::MOP::Method::Generated::BEGIN@16 # spent 72µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 72µ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.22ms (1.13+90µs) within Class::MOP::Method::Generated::_generate_description which was called 129 times, avg 9µs/call: # 129 times (1.13ms+90µs) by Class::MOP::Method::Generated::_compile_code at line 63, avg 9µs/call
sub _generate_description {
2912928µs my ( $self, $context ) = @_;
30129412µs12990µs $context ||= $self->definition_context;
# spent 90µs making 129 calls to Class::MOP::Method::Generated::definition_context, avg 698ns/call
31
3212930µs my $desc = "generated method";
3312915µs my $origin = "unknown origin";
34
3512945µs if (defined $context) {
3612974µs if (defined $context->{description}) {
37 $desc = $context->{description};
38 }
39
40129253µ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
50129385µs return "$desc ($origin)";
51}
52
53
# spent 51.3ms (1.96+49.3) within Class::MOP::Method::Generated::_compile_code which was called 129 times, avg 398µs/call: # 53 times (751µs+9.82ms) by Class::MOP::Method::Accessor::try {...} at line 142 of Class/MOP/Method/Accessor.pm, avg 199µs/call # 31 times (533µs+31.2ms) by Class::MOP::Method::Constructor::try {...} at line 110 of Class/MOP/Method/Constructor.pm, avg 1.02ms/call # 22 times (308µs+3.92ms) by Class::MOP::Method::Accessor::try {...} at line 112 of Class/MOP/Method/Accessor.pm, avg 192µs/call # 16 times (227µs+2.51ms) by Class::MOP::Method::Accessor::try {...} at line 204 of Class/MOP/Method/Accessor.pm, avg 171µs/call # 3 times (75µs+1.18ms) by Moose::Meta::Method::Accessor::try {...} at line 38 of Moose/Meta/Method/Accessor.pm, avg 418µs/call # 3 times (41µs+481µs) by Class::MOP::Method::Accessor::try {...} at line 179 of Class/MOP/Method/Accessor.pm, avg 174µs/call # once (23µs+199µs) by Moose::Meta::Method::Destructor::try {...} at line 97 of Moose/Meta/Method/Destructor.pm
sub _compile_code {
5412965µs my ( $self, @args ) = @_;
55129156µs unshift @args, 'source' if @args % 2;
56129120µs my %args = @args;
57
5812969µs my $context = delete $args{context};
59129598µs16312.8ms my $environment = $self->can('_eval_environment')
# spent 12.3ms making 31 calls to Class::MOP::Method::Constructor::_eval_environment, avg 396µs/call # spent 338µs making 3 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 113µs/call # spent 178µs making 129 calls to UNIVERSAL::can, avg 1µs/call
60 ? $self->_eval_environment
61 : {};
62
63129869µs25836.5ms return eval_closure(
# spent 35.3ms making 129 calls to Eval::Closure::eval_closure, avg 274µs/call # spent 1.22ms making 129 calls to Class::MOP::Method::Generated::_generate_description, avg 9µs/call
64 environment => $environment,
65 description => $self->_generate_description($context),
66 %args,
67 );
68}
69
7013µs1;
71
72# ABSTRACT: Abstract base class for generated methods
73
74__END__