← Index
NYTProf Performance Profile   « line view »
For t/optimization.t
  Run on Thu Jan 8 22:47:42 2015
Reported on Thu Jan 8 22:48:06 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep/RefType.pm
StatementsExecuted 23 statements in 287µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
21125µs662µsTest::Deep::RefType::::descendTest::Deep::RefType::descend
11115µs29µsTest::Deep::::BEGIN@1.16 Test::Deep::BEGIN@1.16
11113µs28µsTest::Deep::RefType::::BEGIN@6Test::Deep::RefType::BEGIN@6
11110µs14µsTest::Deep::::BEGIN@2.17 Test::Deep::BEGIN@2.17
11110µs38µsTest::Deep::RefType::::BEGIN@8Test::Deep::RefType::BEGIN@8
2116µs6µsTest::Deep::RefType::::initTest::Deep::RefType::init
0000s0sTest::Deep::RefType::::renderGotTest::Deep::RefType::renderGot
0000s0sTest::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
1227µs243µs
# spent 29µs (15+14) within Test::Deep::BEGIN@1.16 which was called: # once (15µs+14µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 1
use strict;
# spent 29µs making 1 call to Test::Deep::BEGIN@1.16 # spent 14µs making 1 call to strict::import
2233µs219µs
# spent 14µs (10+4) within Test::Deep::BEGIN@2.17 which was called: # once (10µs+4µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 2
use warnings;
# spent 14µs making 1 call to Test::Deep::BEGIN@2.17 # spent 4µs making 1 call to warnings::import
3
4package Test::Deep::RefType;
5
6229µs242µs
# spent 28µs (13+15) within Test::Deep::RefType::BEGIN@6 which was called: # once (13µs+15µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 6
use Test::Deep::Cmp;
# spent 28µs making 1 call to Test::Deep::RefType::BEGIN@6 # spent 15µs making 1 call to Test::Deep::Cmp::import
7
82157µs267µs
# spent 38µs (10+29) within Test::Deep::RefType::BEGIN@8 which was called: # once (10µs+29µs) by Test::Deep::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep.pm:81] at line 8
use Scalar::Util qw( reftype );
# spent 38µs making 1 call to Test::Deep::RefType::BEGIN@8 # spent 29µs making 1 call to Exporter::import
9
10sub init
11
# spent 6µs within Test::Deep::RefType::init which was called 2 times, avg 3µs/call: # 2 times (6µs+0s) by Test::Deep::Cmp::new at line 33 of Test/Deep/Cmp.pm, avg 3µs/call
{
122500ns my $self = shift;
13
14210µs $self->{val} = shift;
15}
16
17sub descend
18
# spent 662µs (25+637) within Test::Deep::RefType::descend which was called 2 times, avg 331µs/call: # 2 times (25µs+637µs) by Test::Deep::descend at line 344 of Test/Deep.pm, avg 331µs/call
{
192900ns my $self = shift;
20
212600ns my $got = shift;
22
2322µs my $exp = $self->{val};
2427µs21µs my $reftype = reftype($got);
# spent 1µs making 2 calls to Scalar::Util::reftype, avg 700ns/call
25
26217µs4524µs return Test::Deep::descend($reftype, Test::Deep::shallow($exp));
# spent 524µs making 2 calls to Test::Deep::__ANON__[Test/Deep.pm:81], avg 262µs/call # spent 112µs making 2 calls to Test::Deep::descend, avg 56µs/call, recursion: max depth 4, sum of overlapping time 112µs
27}
28
29sub render_stack
30{
31 my $self = shift;
32 my $var = shift;
33
34 return "reftype($var)";
35}
36
37sub renderGot
38{
39 my $self = shift;
40
41 my $got = shift;
42
43 $self->SUPER::renderGot(reftype($got));
44}
45
4612µs1;