Profile of Test/Deep/ArrayLength.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:06 2012

Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/ArrayLength.pm
Statements | Executed 127 statements in 1.76ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
15 | 1 | 1 | 718µs | 30.5ms | Test::Deep::ArrayLength::::descendTest::Deep::ArrayLength::descend
15 | 1 | 1 | 349µs | 349µs | Test::Deep::ArrayLength::::initTest::Deep::ArrayLength::init
1 | 1 | 1 | 73µs | 90µs | Test::Deep::::BEGIN@1.9 Test::Deep::BEGIN@1.9
1 | 1 | 1 | 30µs | 59µs | Test::Deep::::BEGIN@2.10 Test::Deep::BEGIN@2.10
1 | 1 | 1 | 28µs | 108µs | Test::Deep::ArrayLength::::BEGIN@6Test::Deep::ArrayLength::BEGIN@6

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

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 | 2 | 104µs | 2 | 107µs | # spent 90µs (73+17) within Test::Deep::BEGIN@1.9 which was called: # once (73µ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 90µs making 1 call to Test::Deep::BEGIN@1.9 # spent 17µs making 1 call to strict::import
2 | 2 | 130µs | 2 | 88µs | # spent 59µs (30+29) within Test::Deep::BEGIN@2.10 which was called: # once (30µs+29µ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 59µs making 1 call to Test::Deep::BEGIN@2.10 # spent 29µs making 1 call to warnings::import
3 |  |  |  |  |
4 |  |  |  |  | package Test::Deep::ArrayLength;
5 |  |  |  |  |
6 | 2 | 462µs | 2 | 189µs | # spent 108µs (28+81) within Test::Deep::ArrayLength::BEGIN@6 which was called: # once (28µs+81µ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 108µs making 1 call to Test::Deep::ArrayLength::BEGIN@6 # spent 80µs making 1 call to Test::Deep::Cmp::import
7 |  |  |  |  |
8 |  |  |  |  | sub init
9 |  |  |  |  | # spent 349µs within Test::Deep::ArrayLength::init which was called 15 times, avg 23µs/call: # 15 times (349µs+0s) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 23µs/call {
10 | 45 | 391µs |  |  | my $self = shift;
11 |  |  |  |  |
12 |  |  |  |  | my $val = shift;
13 |  |  |  |  |
14 |  |  |  |  | $self->{val} = $val;
15 |  |  |  |  | }
16 |  |  |  |  |
17 |  |  |  |  | sub descend
18 |  |  |  |  | # spent 30.5ms (718µs+29.8) within Test::Deep::ArrayLength::descend which was called 15 times, avg 2.03ms/call: # 15 times (718µs+29.8ms) by Test::Deep::descend at line 328 of Test/Deep.pm, avg 2.03ms/call {
19 | 75 | 666µs |  |  | my $self = shift;
20 |  |  |  |  | my $got = shift;
21 |  |  |  |  |
22 |  |  |  |  | my $exp = $self->{val};
23 |  |  |  |  |
24 |  |  | 15 | 18.7ms | return 0 unless $self->test_reftype($got, "ARRAY"); # spent 18.7ms making 15 calls to Test::Deep::Ref::test_reftype, avg 1.25ms/call
25 |  |  |  |  |
26 |  |  | 30 | 3.23ms | return Test::Deep::descend($got, Test::Deep::arraylengthonly($exp)); # spent 3.23ms making 15 calls to Test::Deep::__ANON__[Test/Deep.pm:80], avg 215µs/call # spent 7.81ms making 15 calls to Test::Deep::descend, avg 520µs/call, recursion: max depth 2, sum of overlapping time 7.81ms
27 |  |  |  |  | }
28 |  |  |  |  |
29 | 1 | 9µs |  |  | 1;