← Index
NYTProf Performance Profile   « line view »
For bin/benchmark-perlformance
  Run on Fri Apr 17 15:31:48 2015
Reported on Fri Apr 17 15:32:02 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Class/Data/Inheritable.pm
StatementsExecuted 180 statements in 336µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
366195µs95µsClass::Data::Inheritable::::__ANON__[:23]Class::Data::Inheritable::__ANON__[:23]
55132µs32µsClass::Data::Inheritable::::mk_classdataClass::Data::Inheritable::mk_classdata
11110µs18µsClass::Data::Inheritable::::BEGIN@3Class::Data::Inheritable::BEGIN@3
1116µs25µ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
3219µs227µs
# spent 18µs (10+9) within Class::Data::Inheritable::BEGIN@3 which was called: # once (10µs+9µs) by Exception::Class::Base::BEGIN@9 at line 3
use strict qw(vars subs);
# spent 18µs making 1 call to Class::Data::Inheritable::BEGIN@3 # spent 8µs making 1 call to strict::import
42113µs243µs
# spent 25µs (6+19) within Class::Data::Inheritable::BEGIN@4 which was called: # once (6µs+19µs) by Exception::Class::Base::BEGIN@9 at line 4
use vars qw($VERSION);
# spent 25µs making 1 call to Class::Data::Inheritable::BEGIN@4 # spent 19µs making 1 call to vars::import
51600ns$VERSION = '0.08';
6
7
# spent 32µs within Class::Data::Inheritable::mk_classdata which was called 5 times, avg 6µs/call: # once (8µs+0s) by Exception::Class::Base::BEGIN@15 at line 16 of Exception/Class/Base.pm # once (6µs+0s) by Exception::Class::Base::BEGIN@15 at line 17 of Exception/Class/Base.pm # once (6µs+0s) by Exception::Class::Base::BEGIN@15 at line 20 of Exception/Class/Base.pm # once (6µs+0s) by Exception::Class::Base::BEGIN@15 at line 26 of Exception/Class/Base.pm # once (6µs+0s) by Exception::Class::Base::BEGIN@15 at line 23 of Exception/Class/Base.pm
sub mk_classdata {
853µs my ($declaredclass, $attribute, $data) = @_;
9
105700ns if( ref $declaredclass ) {
11 require Carp;
12 Carp::croak("mk_classdata() is a class method, not an object method");
13 }
14
15
# spent 95µs within Class::Data::Inheritable::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Class/Data/Inheritable.pm:23] which was called 36 times, avg 3µs/call: # 24 times (62µs+0s) by Exception::Class::Base::_initialize at line 131 of Exception/Class/Base.pm, avg 3µs/call # 8 times (26µs+0s) by Exception::Class::Base::_initialize at line 106 of Exception/Class/Base.pm, avg 3µs/call # once (2µs+0s) by Exception::Class::Base::BEGIN@15 at line 18 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@15 at line 27 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@15 at line 21 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@15 at line 24 of Exception/Class/Base.pm
my $accessor = sub {
163621µs my $wantclass = ref($_[0]) || $_[0];
17
183610µs return $wantclass->mk_classdata($attribute)->(@_)
19 if @_>1 && $wantclass ne $declaredclass;
20
21365µs $data = $_[1] if @_>1;
2236123µs return $data;
2356µs };
24
2552µs my $alias = "_${attribute}_accessor";
2658µs *{$declaredclass.'::'.$attribute} = $accessor;
27521µs *{$declaredclass.'::'.$alias} = $accessor;
28}
29
3012µs1;
31
32__END__