← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 09:58:41 2014
Reported on Tue Jun 24 09:59:25 2014

Filename/usr/local/lib/site_perl/Log/Filter/Message.pm
StatementsExecuted 16 statements in 284µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs15µsLog::Filter::Message::::BEGIN@2Log::Filter::Message::BEGIN@2
1119µs9µsLog::Filter::Message::::BEGIN@79Log::Filter::Message::BEGIN@79
1117µs39µsLog::Filter::Message::::BEGIN@71Log::Filter::Message::BEGIN@71
1117µs12µsLog::Filter::Message::::BEGIN@3Log::Filter::Message::BEGIN@3
1117µs37µsLog::Filter::Message::::BEGIN@5Log::Filter::Message::BEGIN@5
1116µs34µsLog::Filter::Message::::BEGIN@80Log::Filter::Message::BEGIN@80
1114µs4µsLog::Filter::Message::::BEGIN@76Log::Filter::Message::BEGIN@76
1112µs2µsLog::Filter::Message::::ENDLog::Filter::Message::END
0000s0sLog::Filter::Message::::_initLog::Filter::Message::_init
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::Message;
2223µs218µs
# spent 15µs (12+3) within Log::Filter::Message::BEGIN@2 which was called: # once (12µs+3µs) by Log::Loger::BEGIN@125 at line 2
use strict;
# spent 15µs making 1 call to Log::Filter::Message::BEGIN@2 # spent 3µs making 1 call to strict::import
3220µs216µs
# spent 12µs (7+5) within Log::Filter::Message::BEGIN@3 which was called: # once (7µs+5µs) by Log::Loger::BEGIN@125 at line 3
use warnings;
# spent 12µs making 1 call to Log::Filter::Message::BEGIN@3 # spent 5µs making 1 call to warnings::import
4
5255µs267µs
# spent 37µs (7+30) within Log::Filter::Message::BEGIN@5 which was called: # once (7µs+30µs) by Log::Loger::BEGIN@125 at line 5
use Data::Dumper;
# spent 37µs making 1 call to Log::Filter::Message::BEGIN@5 # spent 30µs making 1 call to Exporter::import
6
7################################################################################
8#
9# DOCUMENTATION SECTION
10#
11################################################################################
12
13=head1 NAME
14
15Log::Filter::Message - Accepts messages containing certain PCRE patterns
16
17=head1 SYNOPSIS
18
19 use Log::Filter::Message;
20
21 my $filter = new Log::Filter::Message('emerg.*127.0.0.1');
22 my $filter = new Log::Filter::Message(['127.0.0.1','^notice'],'i r');
23
24 my ($result, $continue) = $filter->accept($source, $severity, $message);
25
26=head1 DESCRIPTION
27
28This module accepts messages, whose MESSAGE body comply to the at least one of the given
29PCRE patterns. Implementation is based on the Log::Filter::Re module, which
30is able to aply the PCRE patterns to the $source and $severity as well.
31
32=head1 USAGE
33
34=head1 BUGS
35
36=head1 SUPPORT
37
38=head1 AUTHOR
39
40Jan Mach
41Cesnet, z.s.p.o
42jan.mach@cesnet.cz
43http://www.cesnet.cz
44
45=head1 COPYRIGHT
46
47This program is free software; you can redistribute
48it and/or modify it under the same terms as Perl itself.
49
50The full text of the license can be found in the
51LICENSE file included with this module.
52
53
54=head1 SEE ALSO
55
56perl(1).
57
58=head1 FUNCTION REFERENCE
59
60=over 4
61
62=cut
63
64################################################################################
65#
66# INITIALIZATION AND CLEANUP SECTION
67#
68################################################################################
69
70#-- Perl core modules ---------------------------------------------------------#
71224µs271µs
# spent 39µs (7+32) within Log::Filter::Message::BEGIN@71 which was called: # once (7µs+32µs) by Log::Loger::BEGIN@125 at line 71
use Carp;
# spent 39µs making 1 call to Log::Filter::Message::BEGIN@71 # spent 32µs making 1 call to Exporter::import
72
73#-- Perl CPAN modules ---------------------------------------------------------#
74
75#-- Custom application modules ------------------------------------------------#
76227µs14µs
# spent 4µs within Log::Filter::Message::BEGIN@76 which was called: # once (4µs+0s) by Log::Loger::BEGIN@125 at line 76
use Log::Filter::Re;
# spent 4µs making 1 call to Log::Filter::Message::BEGIN@76
77
78#-- Module initializations ----------------------------------------------------#
79
# spent 9µs within Log::Filter::Message::BEGIN@79 which was called: # once (9µs+0s) by Log::Loger::BEGIN@125 at line 83
BEGIN {
80230µs262µs
# spent 34µs (6+28) within Log::Filter::Message::BEGIN@80 which was called: # once (6µs+28µs) by Log::Loger::BEGIN@125 at line 80
use vars qw($VERSION @ISA);
# spent 34µs making 1 call to Log::Filter::Message::BEGIN@80 # spent 28µs making 1 call to vars::import
8129µs $VERSION = '0.01';
82 @ISA = ('Log::Filter::Re');
83192µs19µs}
# spent 9µs making 1 call to Log::Filter::Message::BEGIN@79
84
85
86#-- Module clean-up code (global destructor) ----------------------------------#
8712µs
# spent 2µs within Log::Filter::Message::END which was called: # once (2µs+0s) by main::RUNTIME at line 0 of mentat.storage.mongo.pl
END {
88
89}
90
91################################################################################
92#
93# CONSTANTS AND GLOBAL VARIABLES DEFINITION SECTION
94#
95################################################################################
96
97#-- Constants -----------------------------------------------------------------#
98
99#-- Static public class variables (our) ---------------------------------------#
100
101#-- Static protected class variables (my) -------------------------------------#
102
103################################################################################
104#
105# IMPLEMENTATION SECTION
106#
107################################################################################
108
109=item _init() [PROTECTED]
110
111 Usage : Used from constructor as follows: return $self->_init(@_);
112 Purpose : Initialize newly created filter instance
113 Returns : $self
114 Arguments : string $flags - (See Log::Filter::Re->_init() method for details on flags)
115 Throws : Croaks, if invoked on class
116 Comments : Internally used by parent`s new() method
117 See Also : Log::Filter::Re->_init() method
118
119=cut
120
121sub _init {
122 my $self = shift;
123 croak ((caller(0))[3] . ": instance method invoked on class") unless ref $self;
124
125 return $self->SUPER::_init('message', @_);
126}
127
128=pod
129
130=back
131
132=cut
133
13412µs1;