← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 10:04:38 2014
Reported on Tue Jun 24 10:05:08 2014

Filename/usr/local/lib/site_perl/Log/Filter/None.pm
StatementsExecuted 14 statements in 335µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11114µs16µsLog::Filter::None::::BEGIN@2Log::Filter::None::BEGIN@2
11114µs14µsLog::Filter::None::::BEGIN@74Log::Filter::None::BEGIN@74
1117µs12µsLog::Filter::None::::BEGIN@3Log::Filter::None::BEGIN@3
1117µs41µsLog::Filter::None::::BEGIN@66Log::Filter::None::BEGIN@66
1116µs33µsLog::Filter::None::::BEGIN@75Log::Filter::None::BEGIN@75
1114µs4µsLog::Filter::None::::BEGIN@71Log::Filter::None::BEGIN@71
1112µs2µsLog::Filter::None::::ENDLog::Filter::None::END
0000s0sLog::Filter::None::::_initLog::Filter::None::_init
0000s0sLog::Filter::None::::acceptLog::Filter::None::accept
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Log::Filter::None;
2221µs220µs
# spent 16µs (14+3) within Log::Filter::None::BEGIN@2 which was called: # once (14µs+3µs) by Log::Loger::BEGIN@120 at line 2
use strict;
# spent 16µs making 1 call to Log::Filter::None::BEGIN@2 # spent 3µs making 1 call to strict::import
3250µs217µs
# spent 12µs (7+5) within Log::Filter::None::BEGIN@3 which was called: # once (7µs+5µs) by Log::Loger::BEGIN@120 at line 3
use warnings;
# spent 12µs making 1 call to Log::Filter::None::BEGIN@3 # spent 5µs making 1 call to warnings::import
4
5################################################################################
6#
7# DOCUMENTATION SECTION
8#
9################################################################################
10
11=head1 NAME
12
13Log::Filter::None - Reject all log messages (AUTHORITATIVE)
14
15=head1 SYNOPSIS
16
17 use Log::Filter::All;
18
19 my $filter = new Log::Filter::None();
20 my ($result, $continue) = $filter->accept($source, $severity, $message);
21
22=head1 DESCRIPTION
23
24This filter rejects all messages. It is authoritative, so it`s result is
25final and evaluation will not continue.
26
27=head1 USAGE
28
29=head1 BUGS
30
31=head1 SUPPORT
32
33=head1 AUTHOR
34
35Jan Mach
36Cesnet, z.s.p.o
37jan.mach@cesnet.cz
38http://www.cesnet.cz
39
40=head1 COPYRIGHT
41
42This program is free software; you can redistribute
43it and/or modify it under the same terms as Perl itself.
44
45The full text of the license can be found in the
46LICENSE file included with this module.
47
48
49=head1 SEE ALSO
50
51perl(1).
52
53=head1 FUNCTION REFERENCE
54
55=over 4
56
57=cut
58
59################################################################################
60#
61# INITIALIZATION AND CLEANUP SECTION
62#
63################################################################################
64
65#-- Perl core modules ---------------------------------------------------------#
66225µs276µs
# spent 41µs (7+34) within Log::Filter::None::BEGIN@66 which was called: # once (7µs+34µs) by Log::Loger::BEGIN@120 at line 66
use Carp;
# spent 41µs making 1 call to Log::Filter::None::BEGIN@66 # spent 34µs making 1 call to Exporter::import
67
68#-- Perl CPAN modules ---------------------------------------------------------#
69
70#-- Custom application modules ------------------------------------------------#
71234µs14µs
# spent 4µs within Log::Filter::None::BEGIN@71 which was called: # once (4µs+0s) by Log::Loger::BEGIN@120 at line 71
use Log::Filter::Module;
# spent 4µs making 1 call to Log::Filter::None::BEGIN@71
72
73#-- Module initializations ----------------------------------------------------#
74
# spent 14µs within Log::Filter::None::BEGIN@74 which was called: # once (14µs+0s) by Log::Loger::BEGIN@120 at line 78
BEGIN {
75232µs260µs
# spent 33µs (6+27) within Log::Filter::None::BEGIN@75 which was called: # once (6µs+27µs) by Log::Loger::BEGIN@120 at line 75
use vars qw($VERSION @ISA);
# spent 33µs making 1 call to Log::Filter::None::BEGIN@75 # spent 27µs making 1 call to vars::import
76212µs $VERSION = '0.01';
77 @ISA = ('Log::Filter::Module');
781157µs114µs}
# spent 14µs making 1 call to Log::Filter::None::BEGIN@74
79
80
81#-- Module clean-up code (global destructor) ----------------------------------#
8212µs
# spent 2µs within Log::Filter::None::END which was called: # once (2µs+0s) by main::RUNTIME at line 0 of mentat.storage.mongo.pl
END {
83
84}
85
86################################################################################
87#
88# CONSTANTS AND GLOBAL VARIABLES DEFINITION SECTION
89#
90################################################################################
91
92#-- Constants -----------------------------------------------------------------#
93
94#-- Static public class variables (our) ---------------------------------------#
95
96#-- Static protected class variables (my) -------------------------------------#
97
98################################################################################
99#
100# IMPLEMENTATION SECTION
101#
102################################################################################
103
104=item accept($$$) [PUBLIC]
105
106 Usage : my ($result, $continue) = $filter->accept($source, $severity, $message);
107 Purpose : Check, if the filter will accept the given message
108 Returns : Array (Log::Filter::Module::REJECT, Log::Filter::Module::FINISH)
109 Arguments : string $source - Name of the source of the message
110 enum $severity - Severity in integer or string format (see Log::Core::Essentials for permited values)
111 string $message - Message
112 Throws : Croaks, if invoked on class, or if given invalid arguments
113 Comments :
114 See Also :
115
116=cut
117
118sub accept($$$) {
119 my $self = shift;
120 croak ((caller(0))[3] . ": instance method invoked on class") unless ref $self;
121 my ($source, $severity, $message) = @_;
122 croak ((caller(0))[3] . ": invalid arguments") unless (defined($source) and defined($severity) and defined($message));
123
124 # Always return failure, our result is authoritative
125 return (Log::Filter::Module::REJECT, Log::Filter::Module::FINISH);
126}
127
128=item _init() [PROTECTED]
129
130 Usage : Used from constructor as follows: return $self->_init(@_);
131 Purpose : Initialize newly created filter instance
132 Returns : $self
133 Arguments : None
134 Throws : Croaks, if invoked on class
135 Comments : Internally used by parent`s new() method
136 See Also :
137
138=cut
139
140sub _init {
141 my $self = shift;
142 croak ((caller(0))[3] . ": instance method invoked on class") unless ref $self;
143 return $self;
144}
145
146=pod
147
148=back
149
150=cut
151
15212µs1;