← 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:22:54 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Log/Log4perl/NDC.pm
StatementsExecuted 11 statements in 209µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11125µs25µsLog::Log4perl::NDC::::BEGIN@5Log::Log4perl::NDC::BEGIN@5
1117µs10µsLog::Log4perl::NDC::::BEGIN@6Log::Log4perl::NDC::BEGIN@6
1116µs17µsLog::Log4perl::NDC::::BEGIN@7Log::Log4perl::NDC::BEGIN@7
0000s0sLog::Log4perl::NDC::::getLog::Log4perl::NDC::get
0000s0sLog::Log4perl::NDC::::popLog::Log4perl::NDC::pop
0000s0sLog::Log4perl::NDC::::pushLog::Log4perl::NDC::push
0000s0sLog::Log4perl::NDC::::removeLog::Log4perl::NDC::remove
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1##################################################
2package Log::Log4perl::NDC;
3##################################################
4
5334µs125µs
# spent 25µs within Log::Log4perl::NDC::BEGIN@5 which was called: # once (25µs+0s) by Log::Log4perl::Layout::PatternLayout::BEGIN@16 at line 5
use 5.006;
# spent 25µs making 1 call to Log::Log4perl::NDC::BEGIN@5
6317µs213µs
# spent 10µs (7+3) within Log::Log4perl::NDC::BEGIN@6 which was called: # once (7µs+3µs) by Log::Log4perl::Layout::PatternLayout::BEGIN@16 at line 6
use strict;
# spent 10µs making 1 call to Log::Log4perl::NDC::BEGIN@6 # spent 3µs making 1 call to strict::import
73155µs228µs
# spent 17µs (6+11) within Log::Log4perl::NDC::BEGIN@7 which was called: # once (6µs+11µs) by Log::Log4perl::Layout::PatternLayout::BEGIN@16 at line 7
use warnings;
# spent 17µs making 1 call to Log::Log4perl::NDC::BEGIN@7 # spent 11µs making 1 call to warnings::import
8
91400nsour @NDC_STACK = ();
1012µsour $MAX_SIZE = 5;
11
12###########################################
13sub get {
14###########################################
15 if(@NDC_STACK) {
16 # Return elements blank separated
17 return join " ", @NDC_STACK;
18 } else {
19 return "[undef]";
20 }
21}
22
23###########################################
24sub pop {
25###########################################
26 if(@NDC_STACK) {
27 return pop @NDC_STACK;
28 } else {
29 return undef;
30 }
31}
32
33###########################################
34sub push {
35###########################################
36 my($self, $text) = @_;
37
38 unless(defined $text) {
39 # Somebody called us via Log::Log4perl::NDC::push("blah") ?
40 $text = $self;
41 }
42
43 if(@NDC_STACK >= $MAX_SIZE) {
44 CORE::pop(@NDC_STACK);
45 }
46
47 return push @NDC_STACK, $text;
48}
49
50###########################################
51sub remove {
52###########################################
53 @NDC_STACK = ();
54}
55
56__END__