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

Filename/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/Stack.pm
StatementsExecuted 689 statements in 8.05ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
144112.51ms3.56msTest::Deep::Stack::::pushTest::Deep::Stack::push
144112.21ms3.02msTest::Deep::Stack::::popTest::Deep::Stack::pop
18111.83ms3.00msTest::Deep::Stack::::initTest::Deep::Stack::init
1111.81ms2.37msTest::Deep::Stack::::BEGIN@9Test::Deep::Stack::BEGIN@9
2411760µs944µsTest::Deep::Stack::::getLastTest::Deep::Stack::getLast
11154µs72µsTest::Deep::::BEGIN@1.1 Test::Deep::BEGIN@1.1
11143µs110µsTest::Deep::Stack::::BEGIN@7Test::Deep::Stack::BEGIN@7
11131µs62µsTest::Deep::::BEGIN@2.2 Test::Deep::BEGIN@2.2
11128µs166µsTest::Deep::Stack::::BEGIN@6Test::Deep::Stack::BEGIN@6
0000s0sTest::Deep::Stack::::incArrowTest::Deep::Stack::incArrow
0000s0sTest::Deep::Stack::::lengthTest::Deep::Stack::length
0000s0sTest::Deep::Stack::::renderTest::Deep::Stack::render
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1295µs291µs
# spent 72µs (54+19) within Test::Deep::BEGIN@1.1 which was called: # once (54µs+19µs) by Test::Deep::BEGIN@8 at line 1
use strict;
# spent 72µs making 1 call to Test::Deep::BEGIN@1.1 # spent 18µs making 1 call to strict::import
22132µs294µs
# spent 62µs (31+32) within Test::Deep::BEGIN@2.2 which was called: # once (31µs+32µs) by Test::Deep::BEGIN@8 at line 2
use warnings;
# spent 62µs making 1 call to Test::Deep::BEGIN@2.2 # spent 32µs making 1 call to warnings::import
3
4package Test::Deep::Stack;
5
62108µs2304µs
# spent 166µs (28+138) within Test::Deep::Stack::BEGIN@6 which was called: # once (28µs+138µs) by Test::Deep::BEGIN@8 at line 6
use Carp qw( confess );
# spent 166µs making 1 call to Test::Deep::Stack::BEGIN@6 # spent 138µs making 1 call to Exporter::import
72111µs2178µs
# spent 110µs (43+68) within Test::Deep::Stack::BEGIN@7 which was called: # once (43µs+68µs) by Test::Deep::BEGIN@8 at line 7
use Scalar::Util;
# spent 110µs making 1 call to Test::Deep::Stack::BEGIN@7 # spent 68µs making 1 call to Exporter::import
8
921.55ms22.67ms
# spent 2.37ms (1.81+567µs) within Test::Deep::Stack::BEGIN@9 which was called: # once (1.81ms+567µs) by Test::Deep::BEGIN@8 at line 9
use Test::Deep::MM qw( new init Stack Arrow );
# spent 2.37ms making 1 call to Test::Deep::Stack::BEGIN@9 # spent 298µs making 1 call to Test::Deep::MM::import
10
11sub init
12
# spent 3.00ms (1.83+1.17) within Test::Deep::Stack::init which was called 18 times, avg 167µs/call: # 18 times (1.83ms+1.17ms) by Test::Deep::MM::new at line 46 of Test/Deep/MM.pm, avg 167µs/call
{
13541.55ms my $self = shift;
14
1518346µs $self->SUPER::init(@_);
# spent 346µs making 18 calls to Test::Deep::MM::init, avg 19µs/call
16
1736829µs $self->setStack([]) unless $self->getStack;
# spent 452µs making 18 calls to Test::Deep::MM::__ANON__[Test/Deep/MM.pm:28], avg 25µs/call # spent 377µs making 18 calls to Test::Deep::MM::__ANON__[Test/Deep/MM.pm:25], avg 21µs/call
18}
19
20sub push
21
# spent 3.56ms (2.51+1.04) within Test::Deep::Stack::push which was called 144 times, avg 25µs/call: # 144 times (2.51ms+1.04ms) by Test::Deep::descend at line 319 of Test/Deep.pm, avg 25µs/call
{
222882.13ms my $self = shift;
23
241441.04ms push(@{$self->getStack}, @_);
# spent 1.04ms making 144 calls to Test::Deep::MM::__ANON__[Test/Deep/MM.pm:25], avg 7µs/call
25}
26
27sub pop
28
# spent 3.02ms (2.21+814µs) within Test::Deep::Stack::pop which was called 144 times, avg 21µs/call: # 144 times (2.21ms+814µs) by Test::Deep::descend at line 331 of Test/Deep.pm, avg 21µs/call
{
292881.79ms my $self = shift;
30
31144814µs return pop @{$self->getStack};
# spent 814µs making 144 calls to Test::Deep::MM::__ANON__[Test/Deep/MM.pm:25], avg 6µs/call
32}
33
34sub render
35{
36 my $self = shift;
37 my $var = shift;
38
39 my $stack = $self->getStack;
40
41 $self->setArrow(0);
42
43 foreach my $data (@$stack)
44 {
45 my $exp = $data->{exp};
46 if (Scalar::Util::blessed($exp) and $exp->isa("Test::Deep::Cmp"))
47 {
48 $var = $exp->render_stack($var, $data);
49
50 $self->setArrow(0) if $exp->reset_arrow;
51 }
52 else
53 {
54 confess "Don't know how to render '$exp'";
55 }
56 }
57
58 return $var;
59}
60
61sub getLast
62
# spent 944µs (760+184) within Test::Deep::Stack::getLast which was called 24 times, avg 39µs/call: # 24 times (760µs+184µs) by Test::Deep::Cmp::data at line 128 of Test/Deep/Cmp.pm, avg 39µs/call
{
6348567µs my $self = shift;
64
6524184µs return $self->getStack->[-1];
# spent 184µs making 24 calls to Test::Deep::MM::__ANON__[Test/Deep/MM.pm:25], avg 8µs/call
66}
67
68sub incArrow
69{
70 my $self = shift;
71
72 my $a = $self->getArrow;
73 $self->setArrow($a + 1);
74
75 return $a;
76}
77
78sub length
79{
80 my $self = shift;
81
82 return @{$self->getStack} + 0;
83}
84
8519µs1;