← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:26:35 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/OP_match.pm
StatementsExecuted 14 statements in 469µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
31185µs253µsFoswiki::Query::OP_match::::newFoswiki::Query::OP_match::new
11124µs31µsFoswiki::Query::OP_match::::BEGIN@11Foswiki::Query::OP_match::BEGIN@11
11116µs34µsFoswiki::Query::OP_match::::BEGIN@12Foswiki::Query::OP_match::BEGIN@12
1119µs9µsFoswiki::Query::OP_match::::BEGIN@14Foswiki::Query::OP_match::BEGIN@14
0000s0sFoswiki::Query::OP_match::::__ANON__[:38]Foswiki::Query::OP_match::__ANON__[:38]
0000s0sFoswiki::Query::OP_match::::evaluateFoswiki::Query::OP_match::evaluate
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# See bottom of file for license and copyright information
2
3=begin TML
4
5---+ package Foswiki::Query::OP_match
6
7=cut
8
9package Foswiki::Query::OP_match;
10
11245µs238µs
# spent 31µs (24+7) within Foswiki::Query::OP_match::BEGIN@11 which was called: # once (24µs+7µs) by Foswiki::Query::Parser::BEGIN@39 at line 11
use strict;
# spent 31µs making 1 call to Foswiki::Query::OP_match::BEGIN@11 # spent 7µs making 1 call to strict::import
12243µs251µs
# spent 34µs (16+17) within Foswiki::Query::OP_match::BEGIN@12 which was called: # once (16µs+17µs) by Foswiki::Query::Parser::BEGIN@39 at line 12
use warnings;
# spent 34µs making 1 call to Foswiki::Query::OP_match::BEGIN@12 # spent 17µs making 1 call to warnings::import
13
142284µs19µs
# spent 9µs within Foswiki::Query::OP_match::BEGIN@14 which was called: # once (9µs+0s) by Foswiki::Query::Parser::BEGIN@39 at line 14
use Foswiki::Query::ConditionalOP ();
# spent 9µs making 1 call to Foswiki::Query::OP_match::BEGIN@14
1519µsour @ISA = ('Foswiki::Query::ConditionalOP');
16
17
# spent 253µs (85+167) within Foswiki::Query::OP_match::new which was called 3 times, avg 84µs/call: # 3 times (85µs+167µs) by Foswiki::Query::Parser::new at line 105 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Parser.pm, avg 84µs/call
sub new {
18682µs my $class = shift;
193167µs return $class->SUPER::new( name => '=~', prec => 500 );
# spent 167µs making 3 calls to Foswiki::Query::ConditionalOP::new, avg 56µs/call
20}
21
22sub evaluate {
23 my $this = shift;
24 my $node = shift;
25
26 return $this->evalTest(
27 $node,
28 \@_,
29 sub {
30 my $regex;
31 eval { $regex = qr/$_[1]/ };
32 if ($@) {
33 throw Foswiki::Infix::Error("Bad regular expression '$_[1]'");
34 }
35 defined( $_[0] )
36 && defined( $_[1] )
37 && $_[0] =~ m/$regex/s ? 1 : 0;
38 }
39 );
40}
41
4216µs1;
43__END__