← Index
NYTProf Performance Profile   « block view • line view • sub view »
For t/app_dpath.t
  Run on Tue Jun 5 15:25:28 2012
Reported on Tue Jun 5 15:26:13 2012

Filename/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/HashKeys.pm
StatementsExecuted 53 statements in 2.39ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3112.87ms4.31msTest::Deep::HashKeys::::hashkeysonly Test::Deep::HashKeys::hashkeysonly
311164µs182µsTest::Deep::HashKeys::::init Test::Deep::HashKeys::init
311145µs9.24msTest::Deep::HashKeys::::descend Test::Deep::HashKeys::descend
11164µs85µsTest::Deep::Hash::::BEGIN@1 Test::Deep::Hash::BEGIN@1
11133µs340µsTest::Deep::SuperHashKeys::::BEGIN@42Test::Deep::SuperHashKeys::BEGIN@42
11130µs267µsTest::Deep::SubHashKeys::::BEGIN@56 Test::Deep::SubHashKeys::BEGIN@56
11130µs58µsTest::Deep::Hash::::BEGIN@2 Test::Deep::Hash::BEGIN@2
11127µs100µsTest::Deep::HashKeys::::BEGIN@6 Test::Deep::HashKeys::BEGIN@6
0000s0sTest::Deep::SubHashKeys::::hashkeysonly Test::Deep::SubHashKeys::hashkeysonly
0000s0sTest::Deep::SuperHashKeys::::hashkeysonlyTest::Deep::SuperHashKeys::hashkeysonly
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
12109µs2105µs
# spent 85µs (64+21) within Test::Deep::Hash::BEGIN@1 which was called: # once (64µs+21µs) by Test::Deep::Hash::hash_keys at line 1
use strict;
# spent 85µs making 1 call to Test::Deep::Hash::BEGIN@1 # spent 21µs making 1 call to strict::import
22122µs286µs
# spent 58µs (30+28) within Test::Deep::Hash::BEGIN@2 which was called: # once (30µs+28µs) by Test::Deep::Hash::hash_keys at line 2
use warnings;
# spent 58µs making 1 call to Test::Deep::Hash::BEGIN@2 # spent 28µs making 1 call to warnings::import
3
4package Test::Deep::HashKeys;
5
62801µs2172µs
# spent 100µs (27+72) within Test::Deep::HashKeys::BEGIN@6 which was called: # once (27µs+72µs) by Test::Deep::Hash::hash_keys at line 6
use Test::Deep::Ref;
# spent 100µs making 1 call to Test::Deep::HashKeys::BEGIN@6 # spent 72µs making 1 call to Test::Deep::Cmp::import
7
8sub init
9
# spent 182µs (164+17) within Test::Deep::HashKeys::init which was called 3 times, avg 61µs/call: # 3 times (164µs+17µs) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 61µs/call
{
1035µs my $self = shift;
11
1234µs my %keys;
13322µs @keys{@_} = ();
14320µs $self->{val} = \%keys;
153130µs317µs $self->{keys} = [sort @_];
# spent 17µs making 3 calls to Test::Deep::HashKeys::CORE:sort, avg 6µs/call
16}
17
18sub descend
19
# spent 9.24ms (145µs+9.10) within Test::Deep::HashKeys::descend which was called 3 times, avg 3.08ms/call: # 3 times (145µs+9.10ms) by Test::Deep::descend at line 328 of Test/Deep.pm, avg 3.08ms/call
{
2034µs my $self = shift;
2133µs my $got = shift;
22
2338µs my $exp = $self->{val};
24
25340µs32.87ms return 0 unless $self->test_reftype($got, "HASH");
# spent 2.87ms making 3 calls to Test::Deep::Ref::test_reftype, avg 957µs/call
26
27369µs64.31ms return Test::Deep::descend($got, $self->hashkeysonly($exp));
# spent 4.31ms making 3 calls to Test::Deep::HashKeys::hashkeysonly, avg 1.44ms/call # spent 1.92ms making 3 calls to Test::Deep::descend, avg 639µs/call, recursion: max depth 2, sum of overlapping time 1.92ms
28}
29
30sub hashkeysonly
31
# spent 4.31ms (2.87+1.44) within Test::Deep::HashKeys::hashkeysonly which was called 3 times, avg 1.44ms/call: # 3 times (2.87ms+1.44ms) by Test::Deep::HashKeys::descend at line 27, avg 1.44ms/call
{
323366µs require Test::Deep::HashKeysOnly;
33
3436µs my $self = shift;
3533µs my $exp = shift;
36
37383µs3444µs return Test::Deep::HashKeysOnly->new(keys %$exp)
# spent 444µs making 3 calls to Test::Deep::Cmp::new, avg 148µs/call
38}
39
40package Test::Deep::SuperHashKeys;
41
422309µs2648µs
# spent 340µs (33+307) within Test::Deep::SuperHashKeys::BEGIN@42 which was called: # once (33µs+307µs) by Test::Deep::Hash::hash_keys at line 42
use base 'Test::Deep::HashKeys';
# spent 340µs making 1 call to Test::Deep::SuperHashKeys::BEGIN@42 # spent 307µs making 1 call to base::import
43
44sub hashkeysonly
45{
46 require Test::Deep::HashKeysOnly;
47
48 my $self = shift;
49 my $exp = shift;
50
51 return Test::Deep::SuperHashKeysOnly->new(keys %$exp)
52}
53
54package Test::Deep::SubHashKeys;
55
562278µs2503µs
# spent 267µs (30+237) within Test::Deep::SubHashKeys::BEGIN@56 which was called: # once (30µs+237µs) by Test::Deep::Hash::hash_keys at line 56
use base 'Test::Deep::HashKeys';
# spent 267µs making 1 call to Test::Deep::SubHashKeys::BEGIN@56 # spent 237µs making 1 call to base::import
57
58sub hashkeysonly
59{
60 require Test::Deep::HashKeysOnly;
61
62 my $self = shift;
63 my $exp = shift;
64
65 return Test::Deep::SubHashKeysOnly->new(keys %$exp)
66}
67
6819µs1;