← Index
NYTProf Performance Profile   « line view »
For t/optimization.t
  Run on Thu Jan 8 22:47:42 2015
Reported on Thu Jan 8 22:48:06 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep/Hash.pm
StatementsExecuted 45 statements in 794µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
211595µs8.60msTest::Deep::Hash::::hash_elements Test::Deep::Hash::hash_elements
211430µs916µsTest::Deep::Hash::::hash_keys Test::Deep::Hash::hash_keys
111242µs369µsTest::Deep::Hash::::BEGIN@6 Test::Deep::Hash::BEGIN@6
21166µs15.1msTest::Deep::Hash::::descend Test::Deep::Hash::descend
11115µs30µsTest::Deep::::BEGIN@1.12 Test::Deep::BEGIN@1.12
11111µs96µsTest::Deep::SuperHash::::BEGIN@60Test::Deep::SuperHash::BEGIN@60
11110µs14µsTest::Deep::::BEGIN@2.13 Test::Deep::BEGIN@2.13
11110µs78µsTest::Deep::SubHash::::BEGIN@83 Test::Deep::SubHash::BEGIN@83
2119µs9µ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
1228µs245µs
# spent 30µs (15+15) within Test::Deep::BEGIN@1.12 which was called: # once (15µs+15µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 1
use strict;
# spent 30µs making 1 call to Test::Deep::BEGIN@1.12 # spent 15µs making 1 call to strict::import
2238µs219µs
# spent 14µs (10+5) within Test::Deep::BEGIN@2.13 which was called: # once (10µs+5µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 2
use warnings;
# spent 14µs making 1 call to Test::Deep::BEGIN@2.13 # spent 5µs making 1 call to warnings::import
3
4package Test::Deep::Hash;
5
62275µs2386µs
# spent 369µs (242+128) within Test::Deep::Hash::BEGIN@6 which was called: # once (242µs+128µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 6
use Test::Deep::Ref;
# spent 369µs making 1 call to Test::Deep::Hash::BEGIN@6 # spent 17µs making 1 call to Test::Deep::Cmp::import
7
8sub init
9
# spent 9µs within Test::Deep::Hash::init which was called 2 times, avg 4µs/call: # 2 times (9µs+0s) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 4µs/call
{
102900ns my $self = shift;
11
122800ns my $val = shift;
13
14214µs $self->{val} = $val;
15}
16
17sub descend
18
# spent 15.1ms (66µs+15.1) within Test::Deep::Hash::descend which was called 2 times, avg 7.56ms/call: # 2 times (66µs+15.1ms) by Test::Deep::descend at line 344 of Test/Deep.pm, avg 7.56ms/call
{
192900ns my $self = shift;
20
212500ns my $got = shift;
22
2322µs my $exp = $self->{val};
24
2529µs223µs my $data = $self->data;
# spent 23µs making 2 calls to Test::Deep::Cmp::data, avg 12µs/call
26
27214µs4916µs return 0 unless Test::Deep::descend($got, $self->hash_keys($exp));
# spent 916µs making 2 calls to Test::Deep::Hash::hash_keys, avg 458µs/call # spent 3.88ms making 2 calls to Test::Deep::descend, avg 1.94ms/call, recursion: max depth 2, sum of overlapping time 3.88ms
28
29210µs21000µs return 0 unless $self->test_class($got);
# spent 1000µs making 2 calls to Test::Deep::Ref::test_class, avg 500µs/call
30
31213µs48.60ms return Test::Deep::descend($got, $self->hash_elements($exp));
# spent 8.60ms making 2 calls to Test::Deep::Hash::hash_elements, avg 4.30ms/call # spent 638µs making 2 calls to Test::Deep::descend, avg 319µs/call, recursion: max depth 2, sum of overlapping time 638µs
32}
33
34sub hash_elements
35
# spent 8.60ms (595µs+8.00) within Test::Deep::Hash::hash_elements which was called 2 times, avg 4.30ms/call: # 2 times (595µs+8.00ms) by Test::Deep::Hash::descend at line 31, avg 4.30ms/call
{
36271µs require Test::Deep::HashElements;
37
3821µs my $self = shift;
39
40221µs2166µs return Test::Deep::HashElements->new(@_);
# spent 166µs making 2 calls to Test::Deep::Cmp::new, avg 83µs/call
41}
42
43sub hash_keys
44
# spent 916µs (430+487) within Test::Deep::Hash::hash_keys which was called 2 times, avg 458µs/call: # 2 times (430µs+487µs) by Test::Deep::Hash::descend at line 27, avg 458µs/call
{
45261µs require Test::Deep::HashKeys;
46
4721µs my $self = shift;
482400ns my $exp = shift;
49
50227µs2254µs return Test::Deep::HashKeys->new(keys %$exp);
# spent 254µs making 2 calls to Test::Deep::Cmp::new, avg 127µs/call
51}
52
53sub reset_arrow
54{
55 return 0;
56}
57
58package Test::Deep::SuperHash;
59
602108µs2180µs
# spent 96µs (11+85) within Test::Deep::SuperHash::BEGIN@60 which was called: # once (11µs+85µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 60
use base 'Test::Deep::Hash';
# spent 96µs making 1 call to Test::Deep::SuperHash::BEGIN@60 # spent 85µ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
83295µs2147µs
# spent 78µs (10+69) within Test::Deep::SubHash::BEGIN@83 which was called: # once (10µs+69µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 83
use base 'Test::Deep::Hash';
# spent 78µs making 1 call to Test::Deep::SubHash::BEGIN@83 # spent 69µ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
10412µs1;