← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 22:00:36 2010
Reported on Wed Nov 17 22:10:34 2010

Filename/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Generated.pm
StatementsExecuted 2794 statements in 42.8ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2967426.0ms508msClass::MOP::Method::Generated::::_compile_codeClass::MOP::Method::Generated::_compile_code
2961110.1ms11.9msClass::MOP::Method::Generated::::_generate_descriptionClass::MOP::Method::Generated::_generate_description
1113.52ms27.7msClass::MOP::Method::Generated::::BEGIN@8Class::MOP::Method::Generated::BEGIN@8
11189µs106µsClass::MOP::Method::Generated::::BEGIN@4Class::MOP::Method::Generated::BEGIN@4
11146µs330µsClass::MOP::Method::Generated::::BEGIN@14Class::MOP::Method::Generated::BEGIN@14
11139µs117µsClass::MOP::Method::Generated::::BEGIN@5Class::MOP::Method::Generated::BEGIN@5
11135µs187µsClass::MOP::Method::Generated::::BEGIN@7Class::MOP::Method::Generated::BEGIN@7
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
43100µs2123µs
# spent 106µs (89+17) within Class::MOP::Method::Generated::BEGIN@4 which was called: # once (89µs+17µs) by base::import at line 4
use strict;
# spent 106µs making 1 call to Class::MOP::Method::Generated::BEGIN@4 # spent 17µs making 1 call to strict::import
53103µs2196µs
# spent 117µs (39+78) within Class::MOP::Method::Generated::BEGIN@5 which was called: # once (39µs+78µs) by base::import at line 5
use warnings;
# spent 117µs making 1 call to Class::MOP::Method::Generated::BEGIN@5 # spent 78µs making 1 call to warnings::import
6
7396µs2339µs
# spent 187µs (35+152) within Class::MOP::Method::Generated::BEGIN@7 which was called: # once (35µs+152µs) by base::import at line 7
use Carp 'confess';
# spent 187µs making 1 call to Class::MOP::Method::Generated::BEGIN@7 # spent 152µs making 1 call to Exporter::import
83736µs228.8ms
# spent 27.7ms (3.52+24.2) within Class::MOP::Method::Generated::BEGIN@8 which was called: # once (3.52ms+24.2ms) by base::import at line 8
use Eval::Closure;
# spent 27.7ms making 1 call to Class::MOP::Method::Generated::BEGIN@8 # spent 1.13ms making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756]
9
1015µsour $VERSION = '1.11';
11158µs$VERSION = eval $VERSION;
# spent 12µs executing statements in string eval
1214µsour $AUTHORITY = 'cpan:STEVAN';
13
143940µs2330µs
# spent 330µs (46+284) within Class::MOP::Method::Generated::BEGIN@14 which was called: # once (46µs+284µs) by base::import at line 14
use base 'Class::MOP::Method';
# spent 330µs making 1 call to Class::MOP::Method::Generated::BEGIN@14 # spent 284µs making 1 call to base::import, recursion: max depth 2, sum of overlapping time 284µs
15
16## accessors
17
18sub new {
19 confess __PACKAGE__ . " is an abstract base class, you must provide a constructor.";
20}
21
22sub _initialize_body {
23 confess "No body to initialize, " . __PACKAGE__ . " is an abstract base class";
24}
25
26
# spent 11.9ms (10.1+1.78) within Class::MOP::Method::Generated::_generate_description which was called 296 times, avg 40µs/call: # 296 times (10.1ms+1.78ms) by Class::MOP::Method::Generated::_compile_code at line 51, avg 40µs/call
sub _generate_description {
2798512.0ms my ( $self, $context ) = @_;
282961.78ms $context ||= $self->definition_context;
# spent 1.78ms making 296 calls to Class::MOP::Method::Generated::definition_context, avg 6µs/call
29
30 return "generated method (unknown origin)"
31 unless defined $context;
32
3314264µs if (defined $context->{description}) {
34 return "$context->{description} "
35 . "(defined at $context->{file} line $context->{line})";
36 } else {
37 return "$context->{file} (line $context->{line})";
38 }
39}
40
41
# spent 508ms (26.0+482) within Class::MOP::Method::Generated::_compile_code which was called 296 times, avg 1.72ms/call: # 100 times (9.83ms+149ms) by Moose::Meta::Method::Accessor::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Meta/Method/Accessor.pm:28] at line 27 of Moose/Meta/Method/Accessor.pm, avg 1.58ms/call # 73 times (6.96ms+234ms) by Class::MOP::Method::Constructor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Constructor.pm:122] at line 121 of Class/MOP/Method/Constructor.pm, avg 3.30ms/call # 53 times (3.90ms+40.3ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:152] at line 140 of Class/MOP/Method/Accessor.pm, avg 835µs/call # 39 times (2.99ms+33.6ms) by Moose::Meta::Method::Destructor::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Meta/Method/Destructor.pm:94] at line 93 of Moose/Meta/Method/Destructor.pm, avg 937µs/call # 15 times (1.14ms+12.5ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:118] at line 110 of Class/MOP/Method/Accessor.pm, avg 907µs/call # 13 times (986µs+10.2ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:207] at line 202 of Class/MOP/Method/Accessor.pm, avg 858µs/call # 3 times (220µs+2.35ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:182] at line 177 of Class/MOP/Method/Accessor.pm, avg 856µs/call
sub _compile_code {
42177628.5ms my ( $self, @args ) = @_;
43 unshift @args, 'source' if @args % 2;
44 my %args = @args;
45
46 my $context = delete $args{context};
47469118ms my $environment = $self->can('_eval_environment')
# spent 44.8ms making 42 calls to Moose::Meta::Method::Constructor::_eval_environment, avg 1.07ms/call # spent 40.7ms making 31 calls to Class::MOP::Method::Constructor::_eval_environment, avg 1.31ms/call # spent 20.5ms making 86 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 238µs/call # spent 2.35ms making 296 calls to UNIVERSAL::can, avg 8µs/call # spent 2.34ms making 2 calls to Class::MOP::Class::__ANON__::SERIAL::7::_eval_environment, avg 1.17ms/call # spent 1.17ms making 2 calls to Class::MOP::Class::__ANON__::SERIAL::6::_eval_environment, avg 586µs/call # spent 1.13ms making 1 call to Class::MOP::Class::__ANON__::SERIAL::17::_eval_environment # spent 1.13ms making 1 call to Class::MOP::Class::__ANON__::SERIAL::18::_eval_environment # spent 614µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::16::_eval_environment # spent 551µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::12::_eval_environment # spent 550µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::20::_eval_environment # spent 543µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::10::_eval_environment # spent 529µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::13::_eval_environment # spent 520µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::22::_eval_environment # spent 511µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::21::_eval_environment # spent 510µs making 1 call to Class::MOP::Class::__ANON__::SERIAL::9::_eval_environment
48 ? $self->_eval_environment
49 : {};
50
51592363ms return eval_closure(
# spent 351ms making 296 calls to Eval::Closure::eval_closure, avg 1.19ms/call # spent 11.9ms making 296 calls to Class::MOP::Method::Generated::_generate_description, avg 40µs/call
52 environment => $environment,
53 description => $self->_generate_description($context),
54 %args,
55 );
56}
57
58112µs1;
59
60__END__