← 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:01 2012

Filename/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/Shallow.pm
StatementsExecuted 351 statements in 2.88ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3611779µs779µsTest::Deep::Shallow::::initTest::Deep::Shallow::init
3611751µs751µsTest::Deep::Shallow::::descendTest::Deep::Shallow::descend
11168µs84µsTest::Deep::::BEGIN@1.13 Test::Deep::BEGIN@1.13
11130µs57µsTest::Deep::::BEGIN@2.14 Test::Deep::BEGIN@2.14
11130µs180µsTest::Deep::Shallow::::BEGIN@8Test::Deep::Shallow::BEGIN@8
11128µs112µsTest::Deep::Shallow::::BEGIN@6Test::Deep::Shallow::BEGIN@6
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
12103µs2101µs
# spent 84µs (68+17) within Test::Deep::BEGIN@1.13 which was called: # once (68µ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 84µs making 1 call to Test::Deep::BEGIN@1.13 # spent 17µs making 1 call to strict::import
22128µs284µs
# spent 57µs (30+27) within Test::Deep::BEGIN@2.14 which was called: # once (30µ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 57µs making 1 call to Test::Deep::BEGIN@2.14 # spent 27µs making 1 call to warnings::import
3
4package Test::Deep::Shallow;
5
62123µs2195µs
# spent 112µs (28+83) within Test::Deep::Shallow::BEGIN@6 which was called: # once (28µs+83µ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 112µs making 1 call to Test::Deep::Shallow::BEGIN@6 # spent 83µs making 1 call to Test::Deep::Cmp::import
7
82783µs2330µs
# spent 180µs (30+150) within Test::Deep::Shallow::BEGIN@8 which was called: # once (30µs+150µ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( refaddr );
# spent 180µs making 1 call to Test::Deep::Shallow::BEGIN@8 # spent 150µs making 1 call to Exporter::import
9
10sub init
11
# spent 779µs within Test::Deep::Shallow::init which was called 36 times, avg 22µs/call: # 36 times (779µs+0s) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 22µs/call
{
12108851µs my $self = shift;
13
14 my $val = shift;
15 $self->{val} = $val;
16}
17
18sub descend
19
# spent 751µs within Test::Deep::Shallow::descend which was called 36 times, avg 21µs/call: # 36 times (751µs+0s) by Test::Deep::descend at line 328 of Test/Deep.pm, avg 21µs/call
{
20234880µs my $self = shift;
21
22 my $got = shift;
23 my $exp = $self->{val};
24
25 my $ok;
26
27 if (!defined $got and !defined $exp)
28 {
29 $ok = 1;
30 }
31 elsif (defined $got xor defined $exp)
32 {
33 $ok = 0;
34 }
35 elsif (ref $got and ref $exp)
36 {
37 $ok = refaddr($got) == refaddr($exp);
38 }
39 elsif (ref $got xor ref $exp)
40 {
41 $ok = 0;
42 }
43 else
44 {
45 $ok = $got eq $exp;
46 }
47
48 return $ok;
49}
50
5119µs1;