Profile of /usr/local/lib/perl5/5.10.1/Test/Deep/RefType.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:23:26 2010

File | /usr/local/lib/perl5/5.10.1/Test/Deep/RefType.pm
Statements Executed | 34
Statement Execution Time | 331µs

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
3 | 1 | 1 | 31µs | 759µs | Test::Deep::RefType::::descendTest::Deep::RefType::descend
1 | 1 | 1 | 15µs | 30µs | Test::Deep::RefType::::BEGIN@6Test::Deep::RefType::BEGIN@6
1 | 1 | 1 | 9µs | 42µs | Test::Deep::RefType::::BEGIN@8Test::Deep::RefType::BEGIN@8
3 | 1 | 1 | 7µs | 7µs | Test::Deep::RefType::::initTest::Deep::RefType::init
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 | 3 | 28µs | 2 | 26µs | use strict; # spent 22µs making 1 call to Test::Deep::BEGIN@1 # spent 4µs making 1 call to strict::import
2 | 3 | 35µs | 2 | 33µs | use warnings; # spent 21µs making 1 call to Test::Deep::BEGIN@2 # spent 12µs making 1 call to warnings::import
3 |  |  |  |  |
4 |  |  |  |  | package Test::Deep::RefType;
5 |  |  |  |  |
6 | 3 | 33µs | 2 | 45µs | # spent 30µs (15+15) within Test::Deep::RefType::BEGIN@6 which was called # once (15µs+15µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 6 use Test::Deep::Cmp; # spent 30µs making 1 call to Test::Deep::RefType::BEGIN@6 # spent 15µs making 1 call to Test::Deep::Cmp::import
7 |  |  |  |  |
8 | 3 | 183µs | 2 | 74µs | # spent 42µs (9+32) within Test::Deep::RefType::BEGIN@8 which was called # once (9µs+32µs) by Test::Deep::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep.pm:92] at line 8 use Scalar::Util qw( reftype ); # spent 42µs making 1 call to Test::Deep::RefType::BEGIN@8 # spent 32µs making 1 call to Exporter::import
9 |  |  |  |  |
10 |  |  |  |  | sub init
11 |  |  |  |  | # spent 7µs within Test::Deep::RefType::init which was called 3 times, avg 2µs/call: # 3 times (7µs+0s) by Test::Deep::Cmp::new at line 32 of Test/Deep/Cmp.pm, avg 2µs/call {
12 | 3 | 600ns |  |  | my $self = shift;
13 |  |  |  |  |
14 | 3 | 13µs |  |  | $self->{val} = shift;
15 |  |  |  |  | }
16 |  |  |  |  |
17 |  |  |  |  | sub descend
18 |  |  |  |  | # spent 759µs (31+728) within Test::Deep::RefType::descend which was called 3 times, avg 253µs/call: # 3 times (31µs+728µs) by Test::Deep::descend at line 312 of Test/Deep.pm, avg 253µs/call {
19 | 3 | 700ns |  |  | my $self = shift;
20 |  |  |  |  |
21 | 3 | 500ns |  |  | my $got = shift;
22 |  |  |  |  |
23 | 3 | 2µs |  |  | my $exp = $self->{val};
24 | 3 | 9µs | 3 | 2µs | my $reftype = reftype($got); # spent 2µs making 3 calls to Scalar::Util::reftype, avg 667ns/call
25 |  |  |  |  |
26 | 3 | 23µs | 6 | 594µs | return Test::Deep::descend($reftype, Test::Deep::shallow($exp)); # spent 594µs making 3 calls to Test::Deep::__ANON__[Test/Deep.pm:92], avg 198µs/call # spent 132µs making 3 calls to Test::Deep::descend, avg 44µs/call, recursion: max depth 5, time 132µs
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 | 3µs |  |  | 1;