← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:23 2010

File /usr/local/lib/perl5/5.10.1/Test/Deep/RefType.pm
Statements Executed 34
Statement Execution Time 331µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
31131µs759µsTest::Deep::RefType::::descendTest::Deep::RefType::descend
11115µs30µsTest::Deep::RefType::::BEGIN@6Test::Deep::RefType::BEGIN@6
1119µs42µsTest::Deep::RefType::::BEGIN@8Test::Deep::RefType::BEGIN@8
3117µs7µsTest::Deep::RefType::::initTest::Deep::RefType::init
0000s0sTest::Deep::RefType::::renderGotTest::Deep::RefType::renderGot
0000s0sTest::Deep::RefType::::render_stackTest::Deep::RefType::render_stack
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1328µs226µsuse strict;
# spent 22µs making 1 call to Test::Deep::BEGIN@1 # spent 4µs making 1 call to strict::import
2335µs233µsuse warnings;
# spent 21µs making 1 call to Test::Deep::BEGIN@2 # spent 12µs making 1 call to warnings::import
3
4package Test::Deep::RefType;
5
6333µs245µs
# spent 30µs (15+15) within Test::Deep::RefType::BEGIN@6 which was called # once (15µs+15µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 6
use Test::Deep::Cmp;
# spent 30µs making 1 call to Test::Deep::RefType::BEGIN@6 # spent 15µs making 1 call to Test::Deep::Cmp::import
7
83183µs274µs
# spent 42µs (9+32) within Test::Deep::RefType::BEGIN@8 which was called # once (9µs+32µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 8
use Scalar::Util qw( reftype );
# spent 42µs making 1 call to Test::Deep::RefType::BEGIN@8 # spent 32µs making 1 call to Exporter::import
9
10sub init
11
# spent 7µs within Test::Deep::RefType::init which was called 3 times, avg 2µs/call: # 3 times (7µs+0s) by Test::Deep::Cmp::new at line 32 of Test/Deep/Cmp.pm, avg 2µs/call
{
12613µs my $self = shift;
13
14 $self->{val} = shift;
15}
16
17sub descend
18
# spent 759µs (31+728) within Test::Deep::RefType::descend which was called 3 times, avg 253µs/call: # 3 times (31µs+728µs) by Test::Deep::descend at line 312 of Test/Deep.pm, avg 253µs/call
{
191535µs my $self = shift;
20
21 my $got = shift;
22
23 my $exp = $self->{val};
24 my $reftype = reftype($got);
# spent 2µs making 3 calls to Scalar::Util::reftype, avg 667ns/call
25
26 return Test::Deep::descend($reftype, Test::Deep::shallow($exp));
# spent 594µs making 3 calls to Test::Deep::__ANON__[Test/Deep.pm:92], avg 198µs/call # spent 132µs making 3 calls to Test::Deep::descend, avg 44µs/call, recursion: max depth 5, time 132µs
27}
28
29sub render_stack
30{
31 my $self = shift;
32 my $var = shift;
33
34 return "reftype($var)";
35}
36
37sub renderGot
38{
39 my $self = shift;
40
41 my $got = shift;
42
43 $self->SUPER::renderGot(reftype($got));
44}
45
4613µs1;