← 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/ArrayElementsOnly.pm
StatementsExecuted 202 statements in 2.52ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1511956µs2.09msTest::Deep::ArrayElementsOnly::::descendTest::Deep::ArrayElementsOnly::descend
1511266µs266µsTest::Deep::ArrayElementsOnly::::initTest::Deep::ArrayElementsOnly::init
11163µs80µsTest::Deep::::BEGIN@1.19 Test::Deep::BEGIN@1.19
11133µs61µsTest::Deep::::BEGIN@2.20 Test::Deep::BEGIN@2.20
11130µs112µsTest::Deep::ArrayElementsOnly::::BEGIN@6Test::Deep::ArrayElementsOnly::BEGIN@6
0000s0sTest::Deep::ArrayElementsOnly::::render_stackTest::Deep::ArrayElementsOnly::render_stack
0000s0sTest::Deep::ArrayElementsOnly::::reset_arrowTest::Deep::ArrayElementsOnly::reset_arrow
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
12108µs297µs
# spent 80µs (63+17) within Test::Deep::BEGIN@1.19 which was called: # once (63µs+17µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep.pm:80] at line 1
use strict;
# spent 80µs making 1 call to Test::Deep::BEGIN@1.19 # spent 17µs making 1 call to strict::import
22134µs288µs
# spent 61µs (33+27) within Test::Deep::BEGIN@2.20 which was called: # once (33µs+27µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep.pm:80] at line 2
use warnings;
# spent 61µs making 1 call to Test::Deep::BEGIN@2.20 # spent 27µs making 1 call to warnings::import
3
4package Test::Deep::ArrayElementsOnly;
5
62960µs2194µs
# spent 112µs (30+82) within Test::Deep::ArrayElementsOnly::BEGIN@6 which was called: # once (30µs+82µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep.pm:80] at line 6
use Test::Deep::Ref;
# spent 112µs making 1 call to Test::Deep::ArrayElementsOnly::BEGIN@6 # spent 82µs making 1 call to Test::Deep::Cmp::import
7
8sub init
9
# spent 266µs within Test::Deep::ArrayElementsOnly::init which was called 15 times, avg 18µs/call: # 15 times (266µs+0s) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 18µs/call
{
101524µs my $self = shift;
11
121518µs my $val = shift;
13
1415375µs $self->{val} = $val;
15}
16
17sub descend
18
# spent 2.09ms (956µs+1.13) within Test::Deep::ArrayElementsOnly::descend which was called 15 times, avg 139µs/call: # 15 times (956µs+1.13ms) by Test::Deep::descend at line 328 of Test/Deep.pm, avg 139µs/call
{
191521µs my $self = shift;
201514µs my $got = shift;
21
221542µs my $exp = $self->{val};
23
2415120µs15932µs my $data = $self->data;
# spent 932µs making 15 calls to Test::Deep::Cmp::data, avg 62µs/call
25
2615174µs for my $i (0..$#{$exp})
27 {
2815138µs $data->{index} = $i;
29
301558µs my $got_elem = $got->[$i];
311536µs my $exp_elem = $exp->[$i];
32
3315163µs150s return 0 unless Test::Deep::descend($got_elem, $exp_elem)
# spent 199µs making 15 calls to Test::Deep::descend, avg 13µs/call, recursion: max depth 2, sum of overlapping time 199µs
34 }
35
3615129µs return 1;
37}
38
39sub render_stack
40{
41 my $self = shift;
42 my ($var, $data) = @_;
43 $var .= "->" unless $Test::Deep::Stack->incArrow;
44 $var .= "[$data->{index}]";
45
46 return $var;
47}
48
49sub reset_arrow
50{
51 return 0;
52}
53
54110µs1;