← Index
NYTProf Performance Profile   « block view • line view • sub view »
For xt/tapper-mcp-scheduler-with-db-longrun.t
  Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:38 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Test/Deep/Stack.pm
StatementsExecuted 16 statements in 376µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111334µs460µsTest::Deep::Stack::::BEGIN@9Test::Deep::Stack::BEGIN@9
11113µs15µsTest::Deep::::BEGIN@1.34 Test::Deep::BEGIN@1.34
1118µs18µsTest::Deep::::BEGIN@2.35 Test::Deep::BEGIN@2.35
1117µs20µsTest::Deep::Stack::::BEGIN@7Test::Deep::Stack::BEGIN@7
1117µs32µsTest::Deep::Stack::::BEGIN@6Test::Deep::Stack::BEGIN@6
0000s0sTest::Deep::Stack::::getLastTest::Deep::Stack::getLast
0000s0sTest::Deep::Stack::::incArrowTest::Deep::Stack::incArrow
0000s0sTest::Deep::Stack::::initTest::Deep::Stack::init
0000s0sTest::Deep::Stack::::lengthTest::Deep::Stack::length
0000s0sTest::Deep::Stack::::popTest::Deep::Stack::pop
0000s0sTest::Deep::Stack::::pushTest::Deep::Stack::push
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
1318µs217µs
# spent 15µs (13+2) within Test::Deep::BEGIN@1.34 which was called: # once (13µs+2µs) by Test::Deep::BEGIN@8 at line 1
use strict;
# spent 15µs making 1 call to Test::Deep::BEGIN@1.34 # spent 2µs making 1 call to strict::import
2332µs228µs
# spent 18µs (8+10) within Test::Deep::BEGIN@2.35 which was called: # once (8µs+10µs) by Test::Deep::BEGIN@8 at line 2
use warnings;
# spent 18µs making 1 call to Test::Deep::BEGIN@2.35 # spent 10µs making 1 call to warnings::import
3
4package Test::Deep::Stack;
5
6318µs257µs
# spent 32µs (7+25) within Test::Deep::Stack::BEGIN@6 which was called: # once (7µs+25µs) by Test::Deep::BEGIN@8 at line 6
use Carp qw( confess );
# spent 32µs making 1 call to Test::Deep::Stack::BEGIN@6 # spent 25µs making 1 call to Exporter::import
7321µs232µs
# spent 20µs (7+13) within Test::Deep::Stack::BEGIN@7 which was called: # once (7µs+13µs) by Test::Deep::BEGIN@8 at line 7
use Scalar::Util;
# spent 20µs making 1 call to Test::Deep::Stack::BEGIN@7 # spent 13µs making 1 call to Exporter::import
8
93287µs2521µs
# spent 460µs (334+125) within Test::Deep::Stack::BEGIN@9 which was called: # once (334µs+125µs) by Test::Deep::BEGIN@8 at line 9
use Test::Deep::MM qw( new init Stack Arrow );
# spent 460µs making 1 call to Test::Deep::Stack::BEGIN@9 # spent 62µs making 1 call to Test::Deep::MM::import
10
11sub init
12{
13 my $self = shift;
14
15 $self->SUPER::init(@_);
16
17 $self->setStack([]) unless $self->getStack;
18}
19
20sub push
21{
22 my $self = shift;
23
24 push(@{$self->getStack}, @_);
25}
26
27sub pop
28{
29 my $self = shift;
30
31 return pop @{$self->getStack};
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{
63 my $self = shift;
64
65 return $self->getStack->[-1];
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
8512µs1;