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

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Log/Log4perl/MDC.pm
StatementsExecuted 11 statements in 176µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11119µs19µsLog::Log4perl::MDC::::BEGIN@5Log::Log4perl::MDC::BEGIN@5
1117µs12µsLog::Log4perl::MDC::::BEGIN@6Log::Log4perl::MDC::BEGIN@6
1116µs14µsLog::Log4perl::MDC::::BEGIN@7Log::Log4perl::MDC::BEGIN@7
0000s0sLog::Log4perl::MDC::::getLog::Log4perl::MDC::get
0000s0sLog::Log4perl::MDC::::get_contextLog::Log4perl::MDC::get_context
0000s0sLog::Log4perl::MDC::::putLog::Log4perl::MDC::put
0000s0sLog::Log4perl::MDC::::removeLog::Log4perl::MDC::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::MDC;
3##################################################
4
5328µs119µs
# spent 19µs within Log::Log4perl::MDC::BEGIN@5 which was called: # once (19µs+0s) by Log::Log4perl::Layout::PatternLayout::BEGIN@17 at line 5
use 5.006;
# spent 19µs making 1 call to Log::Log4perl::MDC::BEGIN@5
6316µs218µs
# spent 12µs (7+6) within Log::Log4perl::MDC::BEGIN@6 which was called: # once (7µs+6µs) by Log::Log4perl::Layout::PatternLayout::BEGIN@17 at line 6
use strict;
# spent 12µs making 1 call to Log::Log4perl::MDC::BEGIN@6 # spent 6µs making 1 call to strict::import
73130µs221µs
# spent 14µs (6+7) within Log::Log4perl::MDC::BEGIN@7 which was called: # once (6µs+7µs) by Log::Log4perl::Layout::PatternLayout::BEGIN@17 at line 7
use warnings;
# spent 14µs making 1 call to Log::Log4perl::MDC::BEGIN@7 # spent 7µs making 1 call to warnings::import
8
91500nsour %MDC_HASH = ();
10
11###########################################
12sub get {
13###########################################
14 my($class, $key) = @_;
15
16 if($class ne __PACKAGE__) {
17 # Somebody called us with Log::Log4perl::MDC::get($key)
18 $key = $class;
19 }
20
21 if(exists $MDC_HASH{$key}) {
22 return $MDC_HASH{$key};
23 } else {
24 return undef;
25 }
26}
27
28###########################################
29sub put {
30###########################################
31 my($class, $key, $value) = @_;
32
33 if($class ne __PACKAGE__) {
34 # Somebody called us with Log::Log4perl::MDC::put($key, $value)
35 $value = $key;
36 $key = $class;
37 }
38
39 $MDC_HASH{$key} = $value;
40}
41
42###########################################
43sub remove {
44###########################################
45 %MDC_HASH = ();
46
47 1;
48}
49
50###########################################
51sub get_context {
52###########################################
53 return \%MDC_HASH;
54}
55
5612µs1;
57
58__END__