← Index
NYTProf Performance Profile   « block view • line view • sub view »
For xt/tapper-mcp-scheduler-with-db-longrun.t
  Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:23:46 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Class/Data/Inheritable.pm
StatementsExecuted 1716 statements in 1.79ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
41353983µs1.10msClass::Data::Inheritable::::__ANON__[:23]Class::Data::Inheritable::__ANON__[:23]
1233146µs146µsClass::Data::Inheritable::::mk_classdataClass::Data::Inheritable::mk_classdata
11116µs28µsClass::Data::Inheritable::::BEGIN@3Class::Data::Inheritable::BEGIN@3
11111µs38µsClass::Data::Inheritable::::BEGIN@4Class::Data::Inheritable::BEGIN@4
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Class::Data::Inheritable;
2
3320µs241µs
# spent 28µs (16+13) within Class::Data::Inheritable::BEGIN@3 which was called: # once (16µs+13µs) by base::import at line 3
use strict qw(vars subs);
# spent 28µs making 1 call to Class::Data::Inheritable::BEGIN@3 # spent 13µs making 1 call to strict::import
43141µs266µs
# spent 38µs (11+27) within Class::Data::Inheritable::BEGIN@4 which was called: # once (11µs+27µs) by base::import at line 4
use vars qw($VERSION);
# spent 38µs making 1 call to Class::Data::Inheritable::BEGIN@4 # spent 27µs making 1 call to vars::import
51600ns$VERSION = '0.08';
6
7
# spent 146µs within Class::Data::Inheritable::mk_classdata which was called 12 times, avg 12µs/call: # 8 times (100µs+0s) by Class::Data::Inheritable::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Class/Data/Inheritable.pm:23] at line 18, avg 13µs/call # 3 times (31µs+0s) by DBIx::Class::InflateColumn::Object::Enum::BEGIN@6 at line 15 of Object/Enum.pm, avg 10µs/call # once (15µs+0s) by base::import at line 84 of SQL/Translator/Schema/Object.pm
sub mk_classdata {
81214µs my ($declaredclass, $attribute, $data) = @_;
9
10124µs if( ref $declaredclass ) {
11 require Carp;
12 Carp::croak("mk_classdata() is a class method, not an object method");
13 }
14
15
# spent 1.10ms (983µs+120µs) within Class::Data::Inheritable::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Class/Data/Inheritable.pm:23] which was called 413 times, avg 3µs/call: # 387 times (821µs+0s) by SQL::Translator::Schema::Object::_attributes at line 95 of SQL/Translator/Schema/Object.pm, avg 2µs/call # 16 times (134µs+120µs) by SQL::Translator::Schema::Object::_attributes at line 94 of SQL/Translator/Schema/Object.pm, avg 16µs/call # 8 times (20µs+0s) by Class::Data::Inheritable::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Class/Data/Inheritable.pm:23] at line 18, avg 2µs/call # once (4µs+0s) by base::import at line 87 of SQL/Translator/Schema/Object.pm # once (4µs+0s) by DBIx::Class::InflateColumn::Object::Enum::BEGIN@6 at line 25 of Object/Enum.pm
my $accessor = sub {
16413201µs my $wantclass = ref($_[0]) || $_[0];
17
18413193µs16120µs return $wantclass->mk_classdata($attribute)->(@_)
# spent 100µs making 8 calls to Class::Data::Inheritable::mk_classdata, avg 13µs/call # spent 20µs making 8 calls to Class::Data::Inheritable::__ANON__[Class/Data/Inheritable.pm:23], avg 2µs/call
19 if @_>1 && $wantclass ne $declaredclass;
20
2140586µs $data = $_[1] if @_>1;
22405974µs return $data;
231233µs };
24
251212µs my $alias = "_${attribute}_accessor";
261226µs *{$declaredclass.'::'.$attribute} = $accessor;
271283µs *{$declaredclass.'::'.$alias} = $accessor;
28}
29
3012µs1;
31
32__END__