Profile of Test/Deep/MM.pm

← 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:23:21 2012

Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Test/Deep/MM.pm
Statements | Executed 39 statements in 365µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 57µs | 62µs | Test::Deep::MM::::import Test::Deep::MM::import
1 | 1 | 1 | 12µs | 14µs | Test::Deep::Stack::::BEGIN@1Test::Deep::Stack::BEGIN@1
1 | 1 | 1 | 8µs | 22µs | Test::Deep::MM::::BEGIN@16 Test::Deep::MM::BEGIN@16
1 | 1 | 1 | 6µs | 14µs | Test::Deep::Stack::::BEGIN@2Test::Deep::Stack::BEGIN@2
1 | 1 | 1 | 6µs | 14µs | Test::Deep::MM::::BEGIN@31 Test::Deep::MM::BEGIN@31
4 | 1 | 1 | 4µs | 4µs | Test::Deep::MM::::CORE:match Test::Deep::MM::CORE:match (opcode)
0 | 0 | 0 | 0s | 0s | Test::Deep::MM::::__ANON__[:25] Test::Deep::MM::__ANON__[:25]
0 | 0 | 0 | 0s | 0s | Test::Deep::MM::::__ANON__[:28] Test::Deep::MM::__ANON__[:28]
0 | 0 | 0 | 0s | 0s | Test::Deep::MM::::init Test::Deep::MM::init
0 | 0 | 0 | 0s | 0s | Test::Deep::MM::::new Test::Deep::MM::new

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 | 3 | 16µs | 2 | 15µs | # spent 14µs (12+2) within Test::Deep::Stack::BEGIN@1 which was called: # once (12µs+2µs) by Test::Deep::Stack::BEGIN@9 at line 1 use strict; # spent 14µs making 1 call to Test::Deep::Stack::BEGIN@1 # spent 2µs making 1 call to strict::import
2 | 3 | 65µs | 2 | 22µ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@9 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 |  |  |  |  |
4 |  |  |  |  | package Test::Deep::MM;
5 |  |  |  |  |
6 |  |  |  |  | sub import
7 |  |  |  |  | # spent 62µs (57+5) within Test::Deep::MM::import which was called: # once (57µs+5µs) by Test::Deep::Stack::BEGIN@9 at line 9 of Test/Deep/Stack.pm {
8 | 4 | 7µs |  |  | my $self = shift;
9 |  |  |  |  |
10 |  |  |  |  | my ($pkg) = caller();
11 |  |  |  |  | my $mpkg = $pkg."::Methods";
12 |  |  |  |  | foreach my $attr (@_)
13 |  |  |  |  | {
14 | 16 | 34µs | 4 | 4µs | if ($attr =~ /^[a-z]/) # spent 4µs making 4 calls to Test::Deep::MM::CORE:match, avg 1µs/call
15 |  |  |  |  | {
16 | 3 | 99µs | 2 | 37µs | # spent 22µs (8+15) within Test::Deep::MM::BEGIN@16 which was called: # once (8µs+15µs) by Test::Deep::Stack::BEGIN@9 at line 16 no strict 'refs'; # spent 22µs making 1 call to Test::Deep::MM::BEGIN@16 # spent 14µ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 |  |  |  |  | my $get_sub = sub {
24 |  |  |  |  | return $_[0]->{$attr};
25 |  |  |  |  | };
26 |  |  |  |  | my $set_sub = sub {
27 |  |  |  |  | return $_[0]->{$attr} = $_[1];
28 |  |  |  |  | };
29 |  |  |  |  |
30 |  |  |  |  | {
31 | 3 | 120µs | 2 | 22µs | # spent 14µs (6+8) within Test::Deep::MM::BEGIN@31 which was called: # once (6µs+8µs) by Test::Deep::Stack::BEGIN@9 at line 31 no strict 'refs'; # spent 14µs making 1 call to Test::Deep::MM::BEGIN@31 # spent 8µs making 1 call to strict::unimport
32 | 6 | 23µs |  |  | *$get_name = $get_sub;
33 |  |  |  |  | *$set_name = $set_sub;
34 |  |  |  |  | push(@{$pkg."::ISA"}, $mpkg);
35 |  |  |  |  | }
36 |  |  |  |  | }
37 |  |  |  |  | }
38 |  |  |  |  | }
39 |  |  |  |  |
40 |  |  |  |  | sub new
41 |  |  |  |  | {
42 |  |  |  |  | my $pkg = shift;
43 |  |  |  |  |
44 |  |  |  |  | my $self = bless {}, $pkg;
45 |  |  |  |  |
46 |  |  |  |  | $self->init(@_);
47 |  |  |  |  |
48 |  |  |  |  | return $self;
49 |  |  |  |  | }
50 |  |  |  |  |
51 |  |  |  |  | sub init
52 |  |  |  |  | {
53 |  |  |  |  | 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 |  |  |  |  |
64 | 1 | 2µs |  |  | 1;
|  |  |  |  | # spent 4µs within Test::Deep::MM::CORE:match which was called 4 times, avg 1µs/call: # 4 times (4µs+0s) by Test::Deep::MM::import at line 14, avg 1µs/call sub Test::Deep::MM::CORE:match; # opcode