Profile of /usr/local/lib/perl5/5.10.1/Test/Deep/ArrayLengthOnly.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For 05.Domain_and_Item.t
Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:20 2010

File | /usr/local/lib/perl5/5.10.1/Test/Deep/ArrayLengthOnly.pm
Statements Executed | 17
Statement Execution Time | 254µs

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 7µs | 20µs | Test::Deep::ArrayLengthOnly::::BEGIN@6Test::Deep::ArrayLengthOnly::BEGIN@6
1 | 1 | 1 | 3µs | 3µs | Test::Deep::ArrayLengthOnly::::descendTest::Deep::ArrayLengthOnly::descend
1 | 1 | 1 | 2µs | 2µs | Test::Deep::ArrayLengthOnly::::initTest::Deep::ArrayLengthOnly::init
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 | 3 | 20µs | 2 | 20µs | use strict; # spent 17µs making 1 call to Test::Deep::BEGIN@1 # spent 3µs making 1 call to strict::import
2 | 3 | 29µs | 2 | 29µs | use warnings; # spent 20µs making 1 call to Test::Deep::BEGIN@2 # spent 9µs making 1 call to warnings::import
3 |  |  |  |  |
4 |  |  |  |  | package Test::Deep::ArrayLengthOnly;
5 |  |  |  |  |
6 | 3 | 191µs | 2 | 32µs | # spent 20µs (7+13) within Test::Deep::ArrayLengthOnly::BEGIN@6 which was called # once (7µs+13µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 6 use Test::Deep::Ref; # spent 20µs making 1 call to Test::Deep::ArrayLengthOnly::BEGIN@6 # spent 13µs making 1 call to Test::Deep::Cmp::import
7 |  |  |  |  |
8 |  |  |  |  | sub init
9 |  |  |  |  | # spent 2µs within Test::Deep::ArrayLengthOnly::init which was called # once (2µs+0s) by Test::Deep::Cmp::new at line 32 of Test/Deep/Cmp.pm {
10 | 3 | 6µs |  |  | my $self = shift;
11 |  |  |  |  |
12 |  |  |  |  | my $val = shift;
13 |  |  |  |  |
14 |  |  |  |  | $self->{val} = $val;
15 |  |  |  |  | }
16 |  |  |  |  |
17 |  |  |  |  | sub descend
18 |  |  |  |  | # spent 3µs within Test::Deep::ArrayLengthOnly::descend which was called # once (3µs+0s) by Test::Deep::descend at line 312 of Test/Deep.pm {
19 | 4 | 5µs |  |  | my $self = shift;
20 |  |  |  |  | my $got = shift;
21 |  |  |  |  |
22 |  |  |  |  | my $len = $self->{val};
23 |  |  |  |  |
24 |  |  |  |  | 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 | 3µs |  |  | 1;