← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:20 2010

File /usr/local/lib/perl5/5.10.1/Test/Deep/MM.pm
Statements Executed 118
Statement Execution Time 553µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
724190µs90µsTest::Deep::MM::::__ANON__[:25] Test::Deep::MM::__ANON__[:25]
11161µs64µsTest::Deep::MM::::import Test::Deep::MM::import
11120µs80µsTest::Deep::MM::::new Test::Deep::MM::new
11112µs15µsTest::Deep::Stack::::BEGIN@1Test::Deep::Stack::BEGIN@1
1116µs16µsTest::Deep::MM::::BEGIN@16 Test::Deep::MM::BEGIN@16
1116µs16µsTest::Deep::MM::::BEGIN@31 Test::Deep::MM::BEGIN@31
1116µs14µsTest::Deep::Stack::::BEGIN@2Test::Deep::Stack::BEGIN@2
1114µs4µsTest::Deep::MM::::__ANON__[:28] Test::Deep::MM::__ANON__[:28]
1114µs4µsTest::Deep::MM::::init Test::Deep::MM::init
4123µs3µsTest::Deep::MM::::CORE:match Test::Deep::MM::CORE:match (opcode)
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1319µs218µs
# spent 15µs (12+3) within Test::Deep::Stack::BEGIN@1 which was called # once (12µs+3µs) by Test::Deep::Stack::BEGIN@8 at line 1
use strict;
# spent 15µs making 1 call to Test::Deep::Stack::BEGIN@1 # spent 3µs making 1 call to strict::import
2362µs222µs
# spent 14µs (6+8) within Test::Deep::Stack::BEGIN@2 which was called # once (6µs+8µs) by Test::Deep::Stack::BEGIN@8 at line 2
use warnings;
# spent 14µs making 1 call to Test::Deep::Stack::BEGIN@2 # spent 8µs making 1 call to warnings::import
3
4package Test::Deep::MM;
5
6sub import
7
# spent 64µs (61+3) within Test::Deep::MM::import which was called # once (61µs+3µs) by Test::Deep::Stack::BEGIN@8 at line 8 of Test/Deep/Stack.pm
{
82661µs my $self = shift;
9
10 my ($pkg) = caller();
11 my $mpkg = $pkg."::Methods";
12 foreach my $attr (@_)
13 {
14 if ($attr =~ /^[a-z]/)
# spent 3µs making 4 calls to Test::Deep::MM::CORE:match, avg 775ns/call
15 {
16392µs227µs
# spent 16µs (6+10) within Test::Deep::MM::BEGIN@16 which was called # once (6µs+10µs) by Test::Deep::Stack::BEGIN@8 at line 16
no strict 'refs';
# spent 16µs making 1 call to Test::Deep::MM::BEGIN@16 # spent 10µs making 1 call to strict::unimport
17 *{$mpkg."::$attr"} = \&{$attr};
18 }
19 else
20 {
21 my $get_name = $mpkg."::get$attr";
22 my $set_name = $mpkg."::set$attr";
23
# spent 90µs within Test::Deep::MM::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep/MM.pm:25] which was called 72 times, avg 1µs/call: # 32 times (47µs+0s) by Test::Deep::Stack::push at line 23 of Test/Deep/Stack.pm, avg 1µs/call # 32 times (31µs+0s) by Test::Deep::Stack::pop at line 30 of Test/Deep/Stack.pm, avg 981ns/call # 7 times (7µs+0s) by Test::Deep::Stack::getLast at line 64 of Test/Deep/Stack.pm, avg 1µs/call # once (4µs+0s) by Test::Deep::Stack::init at line 16 of Test/Deep/Stack.pm
my $get_sub = sub {
2472154µs return $_[0]->{$attr};
25 };
26
# spent 4µs within Test::Deep::MM::__ANON__[/usr/local/lib/perl5/5.10.1/Test/Deep/MM.pm:28] which was called # once (4µs+0s) by Test::Deep::Stack::init at line 16 of Test/Deep/Stack.pm
my $set_sub = sub {
2718µs return $_[0]->{$attr} = $_[1];
28 };
29
30 {
313127µs225µs
# spent 16µs (6+10) within Test::Deep::MM::BEGIN@31 which was called # once (6µs+10µs) by Test::Deep::Stack::BEGIN@8 at line 31
no strict 'refs';
# spent 16µs making 1 call to Test::Deep::MM::BEGIN@31 # spent 10µs making 1 call to strict::unimport
32 *$get_name = $get_sub;
33 *$set_name = $set_sub;
34 push(@{$pkg."::ISA"}, $mpkg);
35 }
36 }
37 }
38}
39
40sub new
41
# spent 80µs (20+60) within Test::Deep::MM::new which was called # once (20µs+60µs) by Test::Deep::cmp_details at line 143 of Test/Deep.pm
{
42419µs my $pkg = shift;
43
44 my $self = bless {}, $pkg;
45
46 $self->init(@_);
# spent 60µs making 1 call to Test::Deep::Stack::init
47
48 return $self;
49}
50
51sub init
52
# spent 4µs within Test::Deep::MM::init which was called # once (4µs+0s) by Test::Deep::Stack::init at line 14 of Test/Deep/Stack.pm
{
5328µs my $self = shift;
54
55 while (@_)
56 {
57 my $name = shift || confess("No name");
58
59 my $method = "set$name";
60 $self->$method(shift);
61 }
62}
63
6412µs1;
# spent 3µs within Test::Deep::MM::CORE:match which was called 4 times, avg 775ns/call: # 4 times (3µs+0s) by Test::Deep::MM::import at line 14 of Test/Deep/MM.pm, avg 775ns/call
sub Test::Deep::MM::CORE:match; # xsub