← Index
NYTProf Performance Profile   « line view »
For t/optimization.t
  Run on Thu Jan 8 22:47:42 2015
Reported on Thu Jan 8 22:48:05 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep/MM.pm
StatementsExecuted 111 statements in 786µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11185µs92µsTest::Deep::MM::::import Test::Deep::MM::import
484177µs77µsTest::Deep::MM::::__ANON__[:25] Test::Deep::MM::__ANON__[:25]
42140µs158µsTest::Deep::MM::::new Test::Deep::MM::new
11114µs28µsTest::Deep::Stack::::BEGIN@1Test::Deep::Stack::BEGIN@1
41111µs11µsTest::Deep::MM::::__ANON__[:28] Test::Deep::MM::__ANON__[:28]
41110µs10µsTest::Deep::MM::::init Test::Deep::MM::init
11110µs15µsTest::Deep::Stack::::BEGIN@2Test::Deep::Stack::BEGIN@2
11110µs23µsTest::Deep::MM::::BEGIN@16 Test::Deep::MM::BEGIN@16
1119µs21µsTest::Deep::MM::::BEGIN@31 Test::Deep::MM::BEGIN@31
4116µs6µ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
1228µs243µs
# spent 28µs (14+15) within Test::Deep::Stack::BEGIN@1 which was called: # once (14µs+15µs) by Test::Deep::Stack::BEGIN@9 at line 1
use strict;
# spent 28µs making 1 call to Test::Deep::Stack::BEGIN@1 # spent 15µs making 1 call to strict::import
2288µs219µs
# spent 15µs (10+5) within Test::Deep::Stack::BEGIN@2 which was called: # once (10µs+5µs) by Test::Deep::Stack::BEGIN@9 at line 2
use warnings;
# spent 15µs making 1 call to Test::Deep::Stack::BEGIN@2 # spent 5µs making 1 call to warnings::import
3
4package Test::Deep::MM;
5
6sub import
7
# spent 92µs (85+7) within Test::Deep::MM::import which was called: # once (85µs+7µs) by Test::Deep::Stack::BEGIN@9 at line 9 of Test/Deep/Stack.pm
{
81800ns my $self = shift;
9
1012µs my ($pkg) = caller();
1111µs my $mpkg = $pkg."::Methods";
1216µs foreach my $attr (@_)
13 {
14425µs46µs if ($attr =~ /^[a-z]/)
# spent 6µs making 4 calls to Test::Deep::MM::CORE:match, avg 2µs/call
15 {
162118µs237µs
# spent 23µs (10+14) within Test::Deep::MM::BEGIN@16 which was called: # once (10µs+14µs) by Test::Deep::Stack::BEGIN@9 at line 16
no strict 'refs';
# spent 23µs making 1 call to Test::Deep::MM::BEGIN@16 # spent 14µs making 1 call to strict::unimport
17210µs *{$mpkg."::$attr"} = \&{$attr};
18 }
19 else
20 {
2122µs my $get_name = $mpkg."::get$attr";
2221µs my $set_name = $mpkg."::set$attr";
23
# spent 77µs within Test::Deep::MM::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep/MM.pm:25] which was called 48 times, avg 2µs/call: # 18 times (32µs+0s) by Test::Deep::Stack::push at line 24 of Test/Deep/Stack.pm, avg 2µs/call # 18 times (24µs+0s) by Test::Deep::Stack::pop at line 31 of Test/Deep/Stack.pm, avg 1µs/call # 8 times (13µs+0s) by Test::Deep::Stack::getLast at line 65 of Test/Deep/Stack.pm, avg 2µs/call # 4 times (9µs+0s) by Test::Deep::Stack::init at line 17 of Test/Deep/Stack.pm, avg 2µs/call
my $get_sub = sub {
2448198µs return $_[0]->{$attr};
2524µs };
26
# spent 11µs within Test::Deep::MM::__ANON__[/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/Test/Deep/MM.pm:28] which was called 4 times, avg 3µs/call: # 4 times (11µs+0s) by Test::Deep::Stack::init at line 17 of Test/Deep/Stack.pm, avg 3µs/call
my $set_sub = sub {
27417µs return $_[0]->{$attr} = $_[1];
2821µs };
29
30 {
314183µs233µs
# spent 21µs (9+12) within Test::Deep::MM::BEGIN@31 which was called: # once (9µs+12µs) by Test::Deep::Stack::BEGIN@9 at line 31
no strict 'refs';
# spent 21µs making 1 call to Test::Deep::MM::BEGIN@31 # spent 12µs making 1 call to strict::unimport
32216µs *$get_name = $get_sub;
3324µs *$set_name = $set_sub;
34219µs push(@{$pkg."::ISA"}, $mpkg);
35 }
36 }
37 }
38}
39
40sub new
41
# spent 158µs (40+118) within Test::Deep::MM::new which was called 4 times, avg 40µs/call: # 2 times (25µs+69µs) by Test::Deep::cmp_details at line 163 of Test/Deep.pm, avg 47µs/call # 2 times (15µs+49µs) by Test::Deep::eq_deeply_cache at line 192 of Test/Deep.pm, avg 32µs/call
{
4242µs my $pkg = shift;
43
44416µs my $self = bless {}, $pkg;
45
4649µs4118µs $self->init(@_);
# spent 118µs making 4 calls to Test::Deep::Stack::init, avg 30µs/call
47
48413µs return $self;
49}
50
51sub init
52
# spent 10µs within Test::Deep::MM::init which was called 4 times, avg 3µs/call: # 4 times (10µs+0s) by Test::Deep::Stack::init at line 15 of Test/Deep/Stack.pm, avg 3µs/call
{
5341µs my $self = shift;
54
55418µs 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 6µs within Test::Deep::MM::CORE:match which was called 4 times, avg 2µs/call: # 4 times (6µs+0s) by Test::Deep::MM::import at line 14, avg 2µs/call
sub Test::Deep::MM::CORE:match; # opcode