← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:15 2015

Filename/var/www/foswikidev/core/lib/Foswiki/Query/OP_match.pm
StatementsExecuted 15 statements in 301µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
31140µs112µsFoswiki::Query::OP_match::::newFoswiki::Query::OP_match::new
11113µs25µsFoswiki::Query::OP_match::::BEGIN@11Foswiki::Query::OP_match::BEGIN@11
11110µs13µsFoswiki::Query::OP_match::::BEGIN@12Foswiki::Query::OP_match::BEGIN@12
1114µs4µsFoswiki::Query::OP_match::::BEGIN@14Foswiki::Query::OP_match::BEGIN@14
1114µs4µsFoswiki::Query::OP_match::::BEGIN@17Foswiki::Query::OP_match::BEGIN@17
0000s0sFoswiki::Query::OP_match::::__ANON__[:45]Foswiki::Query::OP_match::__ANON__[:45]
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
11227µs237µs
# spent 25µs (13+12) within Foswiki::Query::OP_match::BEGIN@11 which was called: # once (13µs+12µs) by Foswiki::Query::Parser::BEGIN@46 at line 11
use strict;
# spent 25µs making 1 call to Foswiki::Query::OP_match::BEGIN@11 # spent 12µs making 1 call to strict::import
12223µs217µs
# spent 13µs (10+4) within Foswiki::Query::OP_match::BEGIN@12 which was called: # once (10µs+4µs) by Foswiki::Query::Parser::BEGIN@46 at line 12
use warnings;
# spent 13µs making 1 call to Foswiki::Query::OP_match::BEGIN@12 # spent 4µs making 1 call to warnings::import
13
14250µs14µs
# spent 4µs within Foswiki::Query::OP_match::BEGIN@14 which was called: # once (4µs+0s) by Foswiki::Query::Parser::BEGIN@46 at line 14
use Foswiki::Query::ConditionalOP ();
# spent 4µs making 1 call to Foswiki::Query::OP_match::BEGIN@14
1517µsour @ISA = ('Foswiki::Query::ConditionalOP');
16
17
# spent 4µs within Foswiki::Query::OP_match::BEGIN@17 which was called: # once (4µs+0s) by Foswiki::Query::Parser::BEGIN@46 at line 22
BEGIN {
1817µs if ( $Foswiki::cfg{UseLocale} ) {
19 require locale;
20 import locale();
21 }
221148µs14µs}
# spent 4µs making 1 call to Foswiki::Query::OP_match::BEGIN@17
23
24
# spent 112µs (40+71) within Foswiki::Query::OP_match::new which was called 3 times, avg 37µs/call: # 3 times (40µs+71µs) by Foswiki::Query::Parser::new at line 112 of /var/www/foswikidev/core/lib/Foswiki/Query/Parser.pm, avg 37µs/call
sub new {
2532µs my $class = shift;
26337µs371µs return $class->SUPER::new( name => '=~', prec => 500 );
# spent 71µs making 3 calls to Foswiki::Query::ConditionalOP::new, avg 24µs/call
27}
28
29sub evaluate {
30 my $this = shift;
31 my $node = shift;
32
33 return $this->evalTest(
34 $node,
35 \@_,
36 sub {
37 my $regex;
38 eval { $regex = qr/$_[1]/ };
39 if ($@) {
40 throw Foswiki::Infix::Error("Bad regular expression '$_[1]'");
41 }
42 defined( $_[0] )
43 && defined( $_[1] )
44 && $_[0] =~ m/$regex/s ? 1 : 0;
45 }
46 );
47}
48
4913µs1;
50__END__