← 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:22 2010

File /usr/local/lib/perl5/5.10.1/Test/Deep/Hash.pm
Statements Executed 50
Statement Execution Time 914µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
211520µs807µsTest::Deep::Hash::::hash_elements Test::Deep::Hash::hash_elements
211499µs920µsTest::Deep::Hash::::hash_keys Test::Deep::Hash::hash_keys
111323µs473µsTest::Deep::Hash::::BEGIN@6 Test::Deep::Hash::BEGIN@6
21149µs9.04msTest::Deep::Hash::::descend Test::Deep::Hash::descend
11115µs69µsTest::Deep::SubHash::::BEGIN@83 Test::Deep::SubHash::BEGIN@83
11114µs130µsTest::Deep::SuperHash::::BEGIN@60Test::Deep::SuperHash::BEGIN@60
2117µs7µsTest::Deep::Hash::::init Test::Deep::Hash::init
0000s0sTest::Deep::Hash::::reset_arrow Test::Deep::Hash::reset_arrow
0000s0sTest::Deep::SubHash::::hash_elements Test::Deep::SubHash::hash_elements
0000s0sTest::Deep::SubHash::::hash_keys Test::Deep::SubHash::hash_keys
0000s0sTest::Deep::SuperHash::::hash_elementsTest::Deep::SuperHash::hash_elements
0000s0sTest::Deep::SuperHash::::hash_keysTest::Deep::SuperHash::hash_keys
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1334µs231µsuse strict;
# spent 26µs making 1 call to Test::Deep::BEGIN@1 # spent 4µs making 1 call to strict::import
2344µs252µsuse warnings;
# spent 32µs making 1 call to Test::Deep::BEGIN@2 # spent 20µs making 1 call to warnings::import
3
4package Test::Deep::Hash;
5
63333µs2491µs
# spent 473µs (323+150) within Test::Deep::Hash::BEGIN@6 which was called # once (323µs+150µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 6
use Test::Deep::Ref;
# spent 473µs making 1 call to Test::Deep::Hash::BEGIN@6 # spent 19µs making 1 call to Test::Deep::Cmp::import
7
8sub init
9
# spent 7µs within Test::Deep::Hash::init which was called 2 times, avg 4µs/call: # 2 times (7µs+0s) by Test::Deep::Cmp::new at line 32 of Test/Deep/Cmp.pm, avg 4µs/call
{
10613µs my $self = shift;
11
12 my $val = shift;
13
14 $self->{val} = $val;
15}
16
17sub descend
18
# spent 9.04ms (49µs+8.99) within Test::Deep::Hash::descend which was called 2 times, avg 4.52ms/call: # 2 times (49µs+8.99ms) by Test::Deep::descend at line 312 of Test/Deep.pm, avg 4.52ms/call
{
191433µs my $self = shift;
20
21 my $got = shift;
22
23 my $exp = $self->{val};
24
25 my $data = $self->data;
# spent 20µs making 2 calls to Test::Deep::Cmp::data, avg 10µs/call
26
27 return 0 unless Test::Deep::descend($got, $self->hash_keys($exp));
# spent 920µs making 2 calls to Test::Deep::Hash::hash_keys, avg 460µs/call # spent 3.00ms making 2 calls to Test::Deep::descend, avg 1.50ms/call, recursion: max depth 3, time 3.00ms
28
29 return 0 unless $self->test_class($got);
# spent 833µs making 2 calls to Test::Deep::Ref::test_class, avg 417µs/call
30
31 return Test::Deep::descend($got, $self->hash_elements($exp));
# spent 807µs making 2 calls to Test::Deep::Hash::hash_elements, avg 403µs/call # spent 4.20ms making 2 calls to Test::Deep::descend, avg 2.10ms/call, recursion: max depth 3, time 4.20ms
32}
33
34sub hash_elements
35
# spent 807µs (520+287) within Test::Deep::Hash::hash_elements which was called 2 times, avg 403µs/call: # 2 times (520µs+287µs) by Test::Deep::Hash::descend at line 31, avg 403µs/call
{
366100µs require Test::Deep::HashElements;
37
38 my $self = shift;
39
40 return Test::Deep::HashElements->new(@_);
# spent 71µs making 2 calls to Test::Deep::Cmp::new, avg 35µs/call
41}
42
43sub hash_keys
44
# spent 920µs (499+421) within Test::Deep::Hash::hash_keys which was called 2 times, avg 460µs/call: # 2 times (499µs+421µs) by Test::Deep::Hash::descend at line 27, avg 460µs/call
{
458111µs require Test::Deep::HashKeys;
46
47 my $self = shift;
48 my $exp = shift;
49
50 return Test::Deep::HashKeys->new(keys %$exp);
# spent 176µs making 2 calls to Test::Deep::Cmp::new, avg 88µs/call
51}
52
53sub reset_arrow
54{
55 return 0;
56}
57
58package Test::Deep::SuperHash;
59
603127µs2245µs
# spent 130µs (14+116) within Test::Deep::SuperHash::BEGIN@60 which was called # once (14µs+116µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 60
use base 'Test::Deep::Hash';
# spent 130µs making 1 call to Test::Deep::SuperHash::BEGIN@60 # spent 116µs making 1 call to base::import
61
62sub hash_elements
63{
64 require Test::Deep::HashElements;
65
66 my $self = shift;
67
68 return Test::Deep::SuperHashElements->new(@_);
69}
70
71sub hash_keys
72{
73 require Test::Deep::HashKeys;
74
75 my $self = shift;
76 my $exp = shift;
77
78 return Test::Deep::SuperHashKeys->new(keys %$exp);
79}
80
81package Test::Deep::SubHash;
82
833116µs2123µs
# spent 69µs (15+54) within Test::Deep::SubHash::BEGIN@83 which was called # once (15µs+54µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 83
use base 'Test::Deep::Hash';
# spent 69µs making 1 call to Test::Deep::SubHash::BEGIN@83 # spent 54µs making 1 call to base::import
84
85sub hash_elements
86{
87 require Test::Deep::HashElements;
88
89 my $self = shift;
90
91 return Test::Deep::SubHashElements->new(@_);
92}
93
94sub hash_keys
95{
96 require Test::Deep::HashKeys;
97
98 my $self = shift;
99 my $exp = shift;
100
101 return Test::Deep::SubHashKeys->new(keys %$exp);
102}
103
10413µs1;