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

Filename/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/Test/Deep/Cache.pm
StatementsExecuted 1375 statements in 13.0ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
108114.86ms20.3msTest::Deep::Cache::::cmpTest::Deep::Cache::cmp
108112.86ms16.0msTest::Deep::Cache::::addTest::Deep::Cache::add
18112.27ms4.86msTest::Deep::Cache::::newTest::Deep::Cache::new
1112.17ms6.17msTest::Deep::Cache::::BEGIN@6Test::Deep::Cache::BEGIN@6
18111.19ms1.76msTest::Deep::Cache::::localTest::Deep::Cache::local
216211.13ms1.13msTest::Deep::Cache::::typeTest::Deep::Cache::type
11172µs84µsTest::Deep::::BEGIN@1 Test::Deep::BEGIN@1
11127µs48µsTest::Deep::::BEGIN@2 Test::Deep::BEGIN@2
0000s0sTest::Deep::Cache::::finishTest::Deep::Cache::finish
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1294µs295µs
# spent 84µs (72+12) within Test::Deep::BEGIN@1 which was called: # once (72µs+12µs) by Test::Deep::BEGIN@7 at line 1
use strict;
# spent 84µs making 1 call to Test::Deep::BEGIN@1 # spent 12µs making 1 call to strict::import
22120µs270µs
# spent 48µs (27+21) within Test::Deep::BEGIN@2 which was called: # once (27µs+21µs) by Test::Deep::BEGIN@7 at line 2
use warnings;
# spent 48µs making 1 call to Test::Deep::BEGIN@2 # spent 21µs making 1 call to warnings::import
3
4package Test::Deep::Cache;
5
621.42ms16.17ms
# spent 6.17ms (2.17+4.01) within Test::Deep::Cache::BEGIN@6 which was called: # once (2.17ms+4.01ms) by Test::Deep::BEGIN@7 at line 6
use Test::Deep::Cache::Simple;
# spent 6.17ms making 1 call to Test::Deep::Cache::BEGIN@6
7
8sub new
9
# spent 4.86ms (2.27+2.58) within Test::Deep::Cache::new which was called 18 times, avg 270µs/call: # 18 times (2.27ms+2.58ms) by Test::Deep::cmp_details at line 148 of Test/Deep.pm, avg 270µs/call
{
101082.07ms my $pkg = shift;
11
12 my $self = bless {}, $pkg;
13
1418566µs $self->{expects} = [Test::Deep::Cache::Simple->new];
# spent 566µs making 18 calls to Test::Deep::Cache::Simple::new, avg 31µs/call
1518263µs $self->{normal} = [Test::Deep::Cache::Simple->new];
# spent 263µs making 18 calls to Test::Deep::Cache::Simple::new, avg 15µs/call
16
17181.76ms $self->local;
# spent 1.76ms making 18 calls to Test::Deep::Cache::local, avg 98µs/call
18
19 return $self;
20}
21
22sub add
23
# spent 16.0ms (2.86+13.1) within Test::Deep::Cache::add which was called 108 times, avg 148µs/call: # 108 times (2.86ms+13.1ms) by Test::Deep::descend at line 313 of Test/Deep.pm, avg 148µs/call
{
243242.19ms my $self = shift;
25
26108472µs my $type = $self->type;
# spent 472µs making 108 calls to Test::Deep::Cache::type, avg 4µs/call
27
2810812.6ms $self->{$type}->[-1]->add(@_);
# spent 12.6ms making 108 calls to Test::Deep::Cache::Simple::add, avg 117µs/call
29}
30
31sub cmp
32
# spent 20.3ms (4.86+15.5) within Test::Deep::Cache::cmp which was called 108 times, avg 188µs/call: # 108 times (4.86ms+15.5ms) by Test::Deep::descend at line 303 of Test/Deep.pm, avg 188µs/call
{
33 # go through all the caches to see if we know this one
34
356484.27ms my $self = shift;
36
37108654µs my $type = $self->type;
# spent 654µs making 108 calls to Test::Deep::Cache::type, avg 6µs/call
38
39 foreach my $cache (@{$self->{$type}})
40 {
4121614.8ms return 1 if $cache->cmp(@_);
# spent 14.8ms making 216 calls to Test::Deep::Cache::Simple::cmp, avg 69µs/call
42 }
43
44 return 0
45}
46
47sub local
48
# spent 1.76ms (1.19+564µs) within Test::Deep::Cache::local which was called 18 times, avg 98µs/call: # 18 times (1.19ms+564µs) by Test::Deep::Cache::new at line 17, avg 98µs/call
{
4972925µs my $self = shift;
50
51 foreach my $type (qw( expects normal ))
52 {
5336564µs push(@{$self->{$type}}, Test::Deep::Cache::Simple->new);
# spent 564µs making 36 calls to Test::Deep::Cache::Simple::new, avg 16µs/call
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
# spent 1.13ms within Test::Deep::Cache::type which was called 216 times, avg 5µs/call: # 108 times (654µs+0s) by Test::Deep::Cache::cmp at line 37, avg 6µs/call # 108 times (472µs+0s) by Test::Deep::Cache::add at line 26, avg 4µs/call
{
752161.94ms return $Test::Deep::Expects ? "expects" : "normal";
76}
77
7818µs1;