← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 19:05:14 2015
Reported on Fri Jul 31 19:08:10 2015

Filename/var/www/foswiki11/lib/Foswiki/Query/OP_match.pm
StatementsExecuted 14 statements in 558µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111946µs1.47msFoswiki::Query::OP_match::::BEGIN@14Foswiki::Query::OP_match::BEGIN@14
31158µs150µsFoswiki::Query::OP_match::::newFoswiki::Query::OP_match::new
11124µs46µsFoswiki::Query::OP_match::::BEGIN@11Foswiki::Query::OP_match::BEGIN@11
11116µs25µsFoswiki::Query::OP_match::::BEGIN@12Foswiki::Query::OP_match::BEGIN@12
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
11251µs268µs
# spent 46µs (24+22) within Foswiki::Query::OP_match::BEGIN@11 which was called: # once (24µs+22µs) by Foswiki::Query::Parser::new at line 11
use strict;
# spent 46µs making 1 call to Foswiki::Query::OP_match::BEGIN@11 # spent 22µs making 1 call to strict::import
12240µs233µs
# spent 25µs (16+9) within Foswiki::Query::OP_match::BEGIN@12 which was called: # once (16µs+9µs) by Foswiki::Query::Parser::new at line 12
use warnings;
# spent 25µs making 1 call to Foswiki::Query::OP_match::BEGIN@12 # spent 9µs making 1 call to warnings::import
13
142396µs11.47ms
# spent 1.47ms (946µs+526µs) within Foswiki::Query::OP_match::BEGIN@14 which was called: # once (946µs+526µs) by Foswiki::Query::Parser::new at line 14
use Foswiki::Query::BinaryOP ();
# spent 1.47ms making 1 call to Foswiki::Query::OP_match::BEGIN@14
15111µsour @ISA = ('Foswiki::Query::BinaryOP');
16
17
# spent 150µs (58+92) within Foswiki::Query::OP_match::new which was called 3 times, avg 50µs/call: # 3 times (58µs+92µs) by Foswiki::Query::Parser::new at line 47 of /var/www/foswiki11/lib/Foswiki/Query/Parser.pm, avg 50µs/call
sub new {
1832µs my $class = shift;
19352µs392µs return $class->SUPER::new( name => '=~', prec => 500 );
# spent 92µs making 3 calls to Foswiki::Query::BinaryOP::new, avg 31µ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( 'illegal regex', $_[1] );
34 }
35 defined( $_[0] )
36 && defined( $_[1] )
37 && $_[0] =~ m/$regex/s ? 1 : 0;
38 }
39 );
40}
41
4215µs1;
43__END__