| File | /usr/local/lib/perl5/5.10.1/Test/Deep/Hash.pm |
| Statements Executed | 50 |
| Statement Execution Time | 914µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 1 | 1 | 520µs | 807µs | Test::Deep::Hash::hash_elements |
| 2 | 1 | 1 | 499µs | 920µs | Test::Deep::Hash::hash_keys |
| 1 | 1 | 1 | 323µs | 473µs | Test::Deep::Hash::BEGIN@6 |
| 2 | 1 | 1 | 49µs | 9.04ms | Test::Deep::Hash::descend |
| 1 | 1 | 1 | 15µs | 69µs | Test::Deep::SubHash::BEGIN@83 |
| 1 | 1 | 1 | 14µs | 130µs | Test::Deep::SuperHash::BEGIN@60 |
| 2 | 1 | 1 | 7µs | 7µs | Test::Deep::Hash::init |
| 0 | 0 | 0 | 0s | 0s | Test::Deep::Hash::reset_arrow |
| 0 | 0 | 0 | 0s | 0s | Test::Deep::SubHash::hash_elements |
| 0 | 0 | 0 | 0s | 0s | Test::Deep::SubHash::hash_keys |
| 0 | 0 | 0 | 0s | 0s | Test::Deep::SuperHash::hash_elements |
| 0 | 0 | 0 | 0s | 0s | Test::Deep::SuperHash::hash_keys |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | 3 | 34µs | 2 | 31µs | use strict; # spent 26µs making 1 call to Test::Deep::BEGIN@1
# spent 4µs making 1 call to strict::import |
| 2 | 3 | 44µs | 2 | 52µs | use warnings; # spent 32µs making 1 call to Test::Deep::BEGIN@2
# spent 20µs making 1 call to warnings::import |
| 3 | |||||
| 4 | package Test::Deep::Hash; | ||||
| 5 | |||||
| 6 | 3 | 333µs | 2 | 491µ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 # spent 473µs making 1 call to Test::Deep::Hash::BEGIN@6
# spent 19µs making 1 call to Test::Deep::Cmp::import |
| 7 | |||||
| 8 | sub 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 | ||||
| 10 | 6 | 13µs | my $self = shift; | ||
| 11 | |||||
| 12 | my $val = shift; | ||||
| 13 | |||||
| 14 | $self->{val} = $val; | ||||
| 15 | } | ||||
| 16 | |||||
| 17 | sub 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 | ||||
| 19 | 14 | 33µ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 | |||||
| 34 | sub 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 | ||||
| 36 | 6 | 100µ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 | |||||
| 43 | sub 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 | ||||
| 45 | 8 | 111µ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 | |||||
| 53 | sub reset_arrow | ||||
| 54 | { | ||||
| 55 | return 0; | ||||
| 56 | } | ||||
| 57 | |||||
| 58 | package Test::Deep::SuperHash; | ||||
| 59 | |||||
| 60 | 3 | 127µs | 2 | 245µ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 # spent 130µs making 1 call to Test::Deep::SuperHash::BEGIN@60
# spent 116µ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 | 3 | 116µs | 2 | 123µ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 # spent 69µs making 1 call to Test::Deep::SubHash::BEGIN@83
# spent 54µ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 | 3µs | 1; |