← 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:22:36 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Class/Accessor/Fast.pm
StatementsExecuted 38 statements in 292µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
131156µs56µsClass::Accessor::Fast::::make_ro_accessorClass::Accessor::Fast::make_ro_accessor
21113µs13µsClass::Accessor::Fast::::make_accessorClass::Accessor::Fast::make_accessor
11112µs1.23msClass::Accessor::Fast::::BEGIN@2Class::Accessor::Fast::BEGIN@2
1116µs8µsClass::Accessor::Fast::::BEGIN@3Class::Accessor::Fast::BEGIN@3
0000s0sClass::Accessor::Fast::::__ANON__[:12]Class::Accessor::Fast::__ANON__[:12]
0000s0sClass::Accessor::Fast::::__ANON__[:23]Class::Accessor::Fast::__ANON__[:23]
0000s0sClass::Accessor::Fast::::__ANON__[:39]Class::Accessor::Fast::__ANON__[:39]
0000s0sClass::Accessor::Fast::::make_wo_accessorClass::Accessor::Fast::make_wo_accessor
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Class::Accessor::Fast;
2319µs21.23ms
# spent 1.23ms (12µs+1.21) within Class::Accessor::Fast::BEGIN@2 which was called: # once (12µs+1.21ms) by base::import at line 2
use base 'Class::Accessor';
# spent 1.23ms making 1 call to Class::Accessor::Fast::BEGIN@2 # spent 1.21ms making 1 call to base::import, recursion: max depth 1, sum of overlapping time 1.21ms
33186µs211µs
# spent 8µs (6+2) within Class::Accessor::Fast::BEGIN@3 which was called: # once (6µs+2µs) by base::import at line 3
use strict;
# spent 8µs making 1 call to Class::Accessor::Fast::BEGIN@3 # spent 2µs making 1 call to strict::import
41400ns$Class::Accessor::Fast::VERSION = '0.34';
5
6
# spent 13µs within Class::Accessor::Fast::make_accessor which was called 2 times, avg 6µs/call: # 2 times (13µs+0s) by Class::Accessor::_mk_accessors at line 72 of Class/Accessor.pm, avg 6µs/call
sub make_accessor {
7416µs my($class, $field) = @_;
8
9 return sub {
10 return $_[0]->{$field} if scalar(@_) == 1;
11 return $_[0]->{$field} = scalar(@_) == 2 ? $_[1] : [@_[1..$#_]];
12 };
13}
14
15
16
# spent 56µs within Class::Accessor::Fast::make_ro_accessor which was called 13 times, avg 4µs/call: # 13 times (56µs+0s) by Class::Accessor::_mk_accessors at line 72 of Class/Accessor.pm, avg 4µs/call
sub make_ro_accessor {
172669µs my($class, $field) = @_;
18
19 return sub {
20 return $_[0]->{$field} if @_ == 1;
21 my $caller = caller;
22 $_[0]->_croak("'$caller' cannot alter the value of '$field' on objects of class '$class'");
23 };
24}
25
26
27sub make_wo_accessor {
28 my($class, $field) = @_;
29
30 return sub {
31 if (@_ == 1) {
32 my $caller = caller;
33 $_[0]->_croak("'$caller' cannot access the value of '$field' on objects of class '$class'");
34 }
35 else {
36 return $_[0]->{$field} = $_[1] if @_ == 2;
37 return (shift)->{$field} = \@_;
38 }
39 };
40}
41
42
4312µs1;
44
45__END__