← 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:24:08 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Test/Deep/Cache.pm
StatementsExecuted 10 statements in 377µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111401µs518µsTest::Deep::Cache::::BEGIN@6Test::Deep::Cache::BEGIN@6
291145µs45µsTest::Deep::::CORE:subst Test::Deep::CORE:subst (opcode)
11112µs14µsTest::Deep::::BEGIN@1 Test::Deep::BEGIN@1
1116µs14µsTest::Deep::::BEGIN@2 Test::Deep::BEGIN@2
0000s0sTest::Deep::Cache::::addTest::Deep::Cache::add
0000s0sTest::Deep::Cache::::cmpTest::Deep::Cache::cmp
0000s0sTest::Deep::Cache::::finishTest::Deep::Cache::finish
0000s0sTest::Deep::Cache::::localTest::Deep::Cache::local
0000s0sTest::Deep::Cache::::newTest::Deep::Cache::new
0000s0sTest::Deep::Cache::::typeTest::Deep::Cache::type
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1316µs216µs
# spent 14µs (12+2) within Test::Deep::BEGIN@1 which was called: # once (12µs+2µs) by Test::Deep::BEGIN@7 at line 1
use strict;
# spent 14µs making 1 call to Test::Deep::BEGIN@1 # spent 2µs making 1 call to strict::import
2328µs222µs
# spent 14µs (6+8) within Test::Deep::BEGIN@2 which was called: # once (6µs+8µs) by Test::Deep::BEGIN@7 at line 2
use warnings;
# spent 14µs making 1 call to Test::Deep::BEGIN@2 # spent 8µs making 1 call to warnings::import
3
4package Test::Deep::Cache;
5
63331µs1518µs
# spent 518µs (401+116) within Test::Deep::Cache::BEGIN@6 which was called: # once (401µs+116µs) by Test::Deep::BEGIN@7 at line 6
use Test::Deep::Cache::Simple;
# spent 518µs making 1 call to Test::Deep::Cache::BEGIN@6
7
8sub new
9{
10 my $pkg = shift;
11
12 my $self = bless {}, $pkg;
13
14 $self->{expects} = [Test::Deep::Cache::Simple->new];
15 $self->{normal} = [Test::Deep::Cache::Simple->new];
16
17 $self->local;
18
19 return $self;
20}
21
22sub add
23{
24 my $self = shift;
25
26 my $type = $self->type;
27
28 $self->{$type}->[-1]->add(@_);
29}
30
31sub cmp
32{
33 # go through all the caches to see if we know this one
34
35 my $self = shift;
36
37 my $type = $self->type;
38
39 foreach my $cache (@{$self->{$type}})
40 {
41 return 1 if $cache->cmp(@_);
42 }
43
44 return 0
45}
46
47sub local
48{
49 my $self = shift;
50
51 foreach my $type (qw( expects normal ))
52 {
53 push(@{$self->{$type}}, Test::Deep::Cache::Simple->new);
54 }
55}
56
57sub finish
58{
59 my $self = shift;
60
61 my $keep = shift;
62
63 foreach my $type (qw( expects normal ))
64 {
65 my $caches = $self->{$type};
66
67 my $last = pop @$caches;
68
69 $caches->[-1]->absorb($last) if $keep;
70 }
71}
72
73sub type
74{
75 return $Test::Deep::Expects ? "expects" : "normal";
76}
77
7812µs1;
 
# spent 45µs within Test::Deep::CORE:subst which was called 29 times, avg 2µs/call: # 29 times (45µs+0s) by main::BEGIN@22 at line 76 of Test/Deep.pm, avg 2µs/call
sub Test::Deep::CORE:subst; # opcode