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

Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/RefType.pm
Statements | Executed 135 statements in 2.55ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
18 | 1 | 1 | 907µs | 8.28ms | Test::Deep::RefType::::descendTest::Deep::RefType::descend
18 | 1 | 1 | 439µs | 439µs | Test::Deep::RefType::::initTest::Deep::RefType::init
1 | 1 | 1 | 90µs | 106µs | Test::Deep::::BEGIN@1.11 Test::Deep::BEGIN@1.11
1 | 1 | 1 | 32µs | 59µs | Test::Deep::::BEGIN@2.12 Test::Deep::BEGIN@2.12
1 | 1 | 1 | 31µs | 184µs | Test::Deep::RefType::::BEGIN@8Test::Deep::RefType::BEGIN@8
1 | 1 | 1 | 29µs | 95µs | Test::Deep::RefType::::BEGIN@6Test::Deep::RefType::BEGIN@6
0 | 0 | 0 | 0s | 0s | Test::Deep::RefType::::renderGotTest::Deep::RefType::renderGot
0 | 0 | 0 | 0s | 0s | Test::Deep::RefType::::render_stackTest::Deep::RefType::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 | 113µs | 2 | 121µs | # spent 106µs (90+15) within Test::Deep::BEGIN@1.11 which was called: # once (90µs+15µ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 106µs making 1 call to Test::Deep::BEGIN@1.11 # spent 15µs making 1 call to strict::import
2 | 2 | 130µs | 2 | 87µs | # spent 59µs (32+28) within Test::Deep::BEGIN@2.12 which was called: # once (32µs+28µ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.12 # spent 28µs making 1 call to warnings::import
3 |  |  |  |  |
4 |  |  |  |  | package Test::Deep::RefType;
5 |  |  |  |  |
6 | 2 | 109µs | 2 | 161µs | # spent 95µs (29+66) within Test::Deep::RefType::BEGIN@6 which was called: # once (29µs+66µ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::Cmp; # spent 95µs making 1 call to Test::Deep::RefType::BEGIN@6 # spent 66µs making 1 call to Test::Deep::Cmp::import
7 |  |  |  |  |
8 | 2 | 728µs | 2 | 337µs | # spent 184µs (31+153) within Test::Deep::RefType::BEGIN@8 which was called: # once (31µs+153µ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 8 use Scalar::Util qw( reftype ); # spent 184µs making 1 call to Test::Deep::RefType::BEGIN@8 # spent 153µs making 1 call to Exporter::import
9 |  |  |  |  |
10 |  |  |  |  | sub init
11 |  |  |  |  | # spent 439µs within Test::Deep::RefType::init which was called 18 times, avg 24µs/call: # 18 times (439µs+0s) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 24µs/call {
12 | 36 | 355µs |  |  | my $self = shift;
13 |  |  |  |  |
14 |  |  |  |  | $self->{val} = shift;
15 |  |  |  |  | }
16 |  |  |  |  |
17 |  |  |  |  | sub descend
18 |  |  |  |  | # spent 8.28ms (907µs+7.37) within Test::Deep::RefType::descend which was called 18 times, avg 460µs/call: # 18 times (907µs+7.37ms) by Test::Deep::descend at line 328 of Test/Deep.pm, avg 460µs/call {
19 | 90 | 1.11ms |  |  | my $self = shift;
20 |  |  |  |  |
21 |  |  |  |  | my $got = shift;
22 |  |  |  |  |
23 |  |  |  |  | my $exp = $self->{val};
24 |  |  | 18 | 105µs | my $reftype = reftype($got); # spent 105µs making 18 calls to Scalar::Util::reftype, avg 6µs/call
25 |  |  |  |  |
26 |  |  | 36 | 3.91ms | return Test::Deep::descend($reftype, Test::Deep::shallow($exp)); # spent 3.91ms making 18 calls to Test::Deep::__ANON__[Test/Deep.pm:80], avg 217µs/call # spent 3.35ms making 18 calls to Test::Deep::descend, avg 186µs/call, recursion: max depth 3, sum of overlapping time 3.35ms
27 |  |  |  |  | }
28 |  |  |  |  |
29 |  |  |  |  | sub render_stack
30 |  |  |  |  | {
31 |  |  |  |  | my $self = shift;
32 |  |  |  |  | my $var = shift;
33 |  |  |  |  |
34 |  |  |  |  | return "reftype($var)";
35 |  |  |  |  | }
36 |  |  |  |  |
37 |  |  |  |  | sub renderGot
38 |  |  |  |  | {
39 |  |  |  |  | my $self = shift;
40 |  |  |  |  |
41 |  |  |  |  | my $got = shift;
42 |  |  |  |  |
43 |  |  |  |  | $self->SUPER::renderGot(reftype($got));
44 |  |  |  |  | }
45 |  |  |  |  |
46 | 1 | 10µs |  |  | 1;