Filename | /home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep/Hash.pm |
Statements | Executed 45 statements in 794µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 1 | 1 | 595µs | 8.60ms | hash_elements | Test::Deep::Hash::
2 | 1 | 1 | 430µs | 916µs | hash_keys | Test::Deep::Hash::
1 | 1 | 1 | 242µs | 369µs | BEGIN@6 | Test::Deep::Hash::
2 | 1 | 1 | 66µs | 15.1ms | descend | Test::Deep::Hash::
1 | 1 | 1 | 15µs | 30µs | BEGIN@1.12 | Test::Deep::
1 | 1 | 1 | 11µs | 96µs | BEGIN@60 | Test::Deep::SuperHash::
1 | 1 | 1 | 10µs | 14µs | BEGIN@2.13 | Test::Deep::
1 | 1 | 1 | 10µs | 78µs | BEGIN@83 | Test::Deep::SubHash::
2 | 1 | 1 | 9µs | 9µs | init | Test::Deep::Hash::
0 | 0 | 0 | 0s | 0s | reset_arrow | Test::Deep::Hash::
0 | 0 | 0 | 0s | 0s | hash_elements | Test::Deep::SubHash::
0 | 0 | 0 | 0s | 0s | hash_keys | Test::Deep::SubHash::
0 | 0 | 0 | 0s | 0s | hash_elements | Test::Deep::SuperHash::
0 | 0 | 0 | 0s | 0s | hash_keys | Test::Deep::SuperHash::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 28µs | 2 | 45µ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 # spent 30µs making 1 call to Test::Deep::BEGIN@1.12
# spent 15µs making 1 call to strict::import |
2 | 2 | 38µs | 2 | 19µ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 # spent 14µs making 1 call to Test::Deep::BEGIN@2.13
# spent 5µs making 1 call to warnings::import |
3 | |||||
4 | package Test::Deep::Hash; | ||||
5 | |||||
6 | 2 | 275µs | 2 | 386µ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 # spent 369µs making 1 call to Test::Deep::Hash::BEGIN@6
# spent 17µs making 1 call to Test::Deep::Cmp::import |
7 | |||||
8 | sub 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 | ||||
10 | 2 | 900ns | my $self = shift; | ||
11 | |||||
12 | 2 | 800ns | my $val = shift; | ||
13 | |||||
14 | 2 | 14µs | $self->{val} = $val; | ||
15 | } | ||||
16 | |||||
17 | sub 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 | ||||
19 | 2 | 900ns | my $self = shift; | ||
20 | |||||
21 | 2 | 500ns | my $got = shift; | ||
22 | |||||
23 | 2 | 2µs | my $exp = $self->{val}; | ||
24 | |||||
25 | 2 | 9µs | 2 | 23µs | my $data = $self->data; # spent 23µs making 2 calls to Test::Deep::Cmp::data, avg 12µs/call |
26 | |||||
27 | 2 | 14µs | 4 | 916µ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 | |||||
29 | 2 | 10µs | 2 | 1000µ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 | |||||
31 | 2 | 13µs | 4 | 8.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 | |||||
34 | sub 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 | ||||
36 | 2 | 71µs | require Test::Deep::HashElements; | ||
37 | |||||
38 | 2 | 1µs | my $self = shift; | ||
39 | |||||
40 | 2 | 21µs | 2 | 166µs | return Test::Deep::HashElements->new(@_); # spent 166µs making 2 calls to Test::Deep::Cmp::new, avg 83µs/call |
41 | } | ||||
42 | |||||
43 | sub 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 | ||||
45 | 2 | 61µs | require Test::Deep::HashKeys; | ||
46 | |||||
47 | 2 | 1µs | my $self = shift; | ||
48 | 2 | 400ns | my $exp = shift; | ||
49 | |||||
50 | 2 | 27µs | 2 | 254µ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 | |||||
53 | sub reset_arrow | ||||
54 | { | ||||
55 | return 0; | ||||
56 | } | ||||
57 | |||||
58 | package Test::Deep::SuperHash; | ||||
59 | |||||
60 | 2 | 108µs | 2 | 180µ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 # spent 96µs making 1 call to Test::Deep::SuperHash::BEGIN@60
# spent 85µs making 1 call to base::import |
61 | |||||
62 | sub hash_elements | ||||
63 | { | ||||
64 | require Test::Deep::HashElements; | ||||
65 | |||||
66 | my $self = shift; | ||||
67 | |||||
68 | return Test::Deep::SuperHashElements->new(@_); | ||||
69 | } | ||||
70 | |||||
71 | sub 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 | |||||
81 | package Test::Deep::SubHash; | ||||
82 | |||||
83 | 2 | 95µs | 2 | 147µ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 # spent 78µs making 1 call to Test::Deep::SubHash::BEGIN@83
# spent 69µs making 1 call to base::import |
84 | |||||
85 | sub hash_elements | ||||
86 | { | ||||
87 | require Test::Deep::HashElements; | ||||
88 | |||||
89 | my $self = shift; | ||||
90 | |||||
91 | return Test::Deep::SubHashElements->new(@_); | ||||
92 | } | ||||
93 | |||||
94 | sub 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 | |||||
104 | 1 | 2µs | 1; |