Profile of Test/Deep/ArrayLengthOnly.pm

← 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/ArrayLengthOnly.pm
Statements | Executed 112 statements in 1.91ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
15 | 1 | 1 | 249µs | 249µs | Test::Deep::ArrayLengthOnly::::initTest::Deep::ArrayLengthOnly::init
15 | 1 | 1 | 198µs | 198µs | Test::Deep::ArrayLengthOnly::::descendTest::Deep::ArrayLengthOnly::descend
1 | 1 | 1 | 66µs | 82µs | Test::Deep::::BEGIN@1.15 Test::Deep::BEGIN@1.15
1 | 1 | 1 | 32µs | 58µs | Test::Deep::::BEGIN@2.16 Test::Deep::BEGIN@2.16
1 | 1 | 1 | 27µs | 96µs | Test::Deep::ArrayLengthOnly::::BEGIN@6Test::Deep::ArrayLengthOnly::BEGIN@6
0 | 0 | 0 | 0s | 0s | Test::Deep::ArrayLengthOnly::::renderExpTest::Deep::ArrayLengthOnly::renderExp
0 | 0 | 0 | 0s | 0s | Test::Deep::ArrayLengthOnly::::renderGotTest::Deep::ArrayLengthOnly::renderGot
0 | 0 | 0 | 0s | 0s | Test::Deep::ArrayLengthOnly::::renderValTest::Deep::ArrayLengthOnly::renderVal
0 | 0 | 0 | 0s | 0s | Test::Deep::ArrayLengthOnly::::render_stackTest::Deep::ArrayLengthOnly::render_stack

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 | 2 | 137µs | 2 | 99µs | # spent 82µs (66+17) within Test::Deep::BEGIN@1.15 which was called: # once (66µ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 82µs making 1 call to Test::Deep::BEGIN@1.15 # spent 17µs making 1 call to strict::import
2 | 2 | 132µs | 2 | 85µs | # spent 58µs (32+27) within Test::Deep::BEGIN@2.16 which was called: # once (32µ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 58µs making 1 call to Test::Deep::BEGIN@2.16 # spent 27µs making 1 call to warnings::import
3 |  |  |  |  |
4 |  |  |  |  | package Test::Deep::ArrayLengthOnly;
5 |  |  |  |  |
6 | 2 | 1.01ms | 2 | 165µs | # spent 96µs (27+69) within Test::Deep::ArrayLengthOnly::BEGIN@6 which was called: # once (27µs+69µ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 96µs making 1 call to Test::Deep::ArrayLengthOnly::BEGIN@6 # spent 69µs making 1 call to Test::Deep::Cmp::import
7 |  |  |  |  |
8 |  |  |  |  | sub init
9 |  |  |  |  | # spent 249µs within Test::Deep::ArrayLengthOnly::init which was called 15 times, avg 17µs/call: # 15 times (249µs+0s) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 17µs/call {
10 | 15 | 26µs |  |  | my $self = shift;
11 |  |  |  |  |
12 | 15 | 17µs |  |  | my $val = shift;
13 |  |  |  |  |
14 | 15 | 329µs |  |  | $self->{val} = $val;
15 |  |  |  |  | }
16 |  |  |  |  |
17 |  |  |  |  | sub descend
18 |  |  |  |  | # spent 198µs within Test::Deep::ArrayLengthOnly::descend which was called 15 times, avg 13µs/call: # 15 times (198µs+0s) by Test::Deep::descend at line 328 of Test/Deep.pm, avg 13µs/call {
19 | 15 | 23µs |  |  | my $self = shift;
20 | 15 | 14µs |  |  | my $got = shift;
21 |  |  |  |  |
22 | 15 | 44µs |  |  | my $len = $self->{val};
23 |  |  |  |  |
24 | 15 | 174µs |  |  | return @$got == $len;
25 |  |  |  |  | }
26 |  |  |  |  |
27 |  |  |  |  | sub render_stack
28 |  |  |  |  | {
29 |  |  |  |  | my $self = shift;
30 |  |  |  |  | my ($var, $data) = @_;
31 |  |  |  |  |
32 |  |  |  |  | return "array length of $var";
33 |  |  |  |  | }
34 |  |  |  |  |
35 |  |  |  |  | sub renderVal
36 |  |  |  |  | {
37 |  |  |  |  | my $self = shift;
38 |  |  |  |  |
39 |  |  |  |  | my $val = shift;
40 |  |  |  |  |
41 |  |  |  |  | return "array with $val element(s)"
42 |  |  |  |  | }
43 |  |  |  |  |
44 |  |  |  |  | sub renderGot
45 |  |  |  |  | {
46 |  |  |  |  | my $self = shift;
47 |  |  |  |  |
48 |  |  |  |  | my $got = shift;
49 |  |  |  |  |
50 |  |  |  |  | return $self->renderVal(@$got + 0);
51 |  |  |  |  | }
52 |  |  |  |  |
53 |  |  |  |  | sub renderExp
54 |  |  |  |  | {
55 |  |  |  |  | my $self = shift;
56 |  |  |  |  |
57 |  |  |  |  | return $self->renderVal($self->{val});
58 |  |  |  |  | }
59 |  |  |  |  |
60 | 1 | 10µs |  |  | 1;