← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/pan_genome_post_analysis
  Run on Fri Mar 27 11:43:32 2015
Reported on Fri Mar 27 11:46:06 2015

Filename/Users/ap13/perl5/lib/perl5/Class/Data/Inheritable.pm
StatementsExecuted 48 statements in 260µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
55141µs41µsClass::Data::Inheritable::::mk_classdataClass::Data::Inheritable::mk_classdata
11115µs26µsClass::Data::Inheritable::::BEGIN@3Class::Data::Inheritable::BEGIN@3
1118µs34µsClass::Data::Inheritable::::BEGIN@4Class::Data::Inheritable::BEGIN@4
3317µs7µsClass::Data::Inheritable::::__ANON__[:23]Class::Data::Inheritable::__ANON__[:23]
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
3226µs236µs
# spent 26µs (15+11) within Class::Data::Inheritable::BEGIN@3 which was called: # once (15µs+11µs) by Exception::Class::Base::BEGIN@6 at line 3
use strict qw(vars subs);
# spent 26µs making 1 call to Class::Data::Inheritable::BEGIN@3 # spent 11µs making 1 call to strict::import
42170µs260µs
# spent 34µs (8+26) within Class::Data::Inheritable::BEGIN@4 which was called: # once (8µs+26µs) by Exception::Class::Base::BEGIN@6 at line 4
use vars qw($VERSION);
# spent 34µs making 1 call to Class::Data::Inheritable::BEGIN@4 # spent 26µs making 1 call to vars::import
51700ns$VERSION = '0.08';
6
7
# spent 41µs within Class::Data::Inheritable::mk_classdata which was called 5 times, avg 8µs/call: # once (11µs+0s) by Exception::Class::Base::BEGIN@12 at line 19 of Exception/Class/Base.pm # once (9µs+0s) by Exception::Class::Base::BEGIN@12 at line 13 of Exception/Class/Base.pm # once (8µs+0s) by Exception::Class::Base::BEGIN@12 at line 14 of Exception/Class/Base.pm # once (6µs+0s) by Exception::Class::Base::BEGIN@12 at line 16 of Exception/Class/Base.pm # once (6µs+0s) by Exception::Class::Base::BEGIN@12 at line 22 of Exception/Class/Base.pm
sub mk_classdata {
853µs my ($declaredclass, $attribute, $data) = @_;
9
105500ns if( ref $declaredclass ) {
11 require Carp;
12 Carp::croak("mk_classdata() is a class method, not an object method");
13 }
14
15
# spent 7µs within Class::Data::Inheritable::__ANON__[/Users/ap13/perl5/lib/perl5/Class/Data/Inheritable.pm:23] which was called 3 times, avg 2µs/call: # once (3µs+0s) by Exception::Class::Base::BEGIN@12 at line 17 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@12 at line 20 of Exception/Class/Base.pm # once (2µs+0s) by Exception::Class::Base::BEGIN@12 at line 23 of Exception/Class/Base.pm
my $accessor = sub {
1631µs my $wantclass = ref($_[0]) || $_[0];
17
1831µs return $wantclass->mk_classdata($attribute)->(@_)
19 if @_>1 && $wantclass ne $declaredclass;
20
213600ns $data = $_[1] if @_>1;
2239µs return $data;
23511µs };
24
2553µs my $alias = "_${attribute}_accessor";
2658µs *{$declaredclass.'::'.$attribute} = $accessor;
27523µs *{$declaredclass.'::'.$alias} = $accessor;
28}
29
3013µs1;
31
32__END__