← 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_comma.pm
StatementsExecuted 16 statements in 240µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
42249µs71µsFoswiki::Query::OP_comma::::newFoswiki::Query::OP_comma::new
11114µs26µsFoswiki::Query::OP_comma::::BEGIN@12Foswiki::Query::OP_comma::BEGIN@12
11110µs14µsFoswiki::Query::OP_comma::::BEGIN@13Foswiki::Query::OP_comma::BEGIN@13
1114µs4µsFoswiki::Query::OP_comma::::BEGIN@15Foswiki::Query::OP_comma::BEGIN@15
0000s0sFoswiki::Query::OP_comma::::evaluateFoswiki::Query::OP_comma::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_comma
6List-building n-ary operator.
7
8=cut
9
10package Foswiki::Query::OP_comma;
11
12227µs239µs
# spent 26µs (14+12) within Foswiki::Query::OP_comma::BEGIN@12 which was called: # once (14µs+12µs) by Foswiki::Query::Node::BEGIN@75 at line 12
use strict;
# spent 26µs making 1 call to Foswiki::Query::OP_comma::BEGIN@12 # spent 12µs making 1 call to strict::import
13224µs218µs
# spent 14µs (10+4) within Foswiki::Query::OP_comma::BEGIN@13 which was called: # once (10µs+4µs) by Foswiki::Query::Node::BEGIN@75 at line 13
use warnings;
# spent 14µs making 1 call to Foswiki::Query::OP_comma::BEGIN@13 # spent 4µs making 1 call to warnings::import
14
152136µs14µs
# spent 4µs within Foswiki::Query::OP_comma::BEGIN@15 which was called: # once (4µs+0s) by Foswiki::Query::Node::BEGIN@75 at line 15
use Foswiki::Query::OP ();
# spent 4µs making 1 call to Foswiki::Query::OP_comma::BEGIN@15
1617µsour @ISA = ('Foswiki::Query::OP');
17
18
# spent 71µs (49+22) within Foswiki::Query::OP_comma::new which was called 4 times, avg 18µs/call: # 3 times (29µs+13µs) by Foswiki::Query::Parser::new at line 112 of /var/www/foswikidev/core/lib/Foswiki/Query/Parser.pm, avg 14µs/call # once (20µs+9µs) by Foswiki::Query::Node::BEGIN@75 at line 79 of /var/www/foswikidev/core/lib/Foswiki/Query/Node.pm
sub new {
1942µs my $class = shift;
20
21 # Treated as arity 2 for parsing, but folds to n-ary
22442µs422µs return $class->SUPER::new(
# spent 22µs making 4 calls to Foswiki::Query::OP::new, avg 6µs/call
23 arity => 2,
24 canfold => 1,
25 name => ',',
26 prec => 400,
27 canfold => 1
28 );
29}
30
31sub evaluate {
32 my $this = shift;
33 my $node = shift;
34 my @res;
35 foreach my $p ( @{ $node->{params} } ) {
36 my $a = $p->evaluate(@_);
37 if ( ref($a) eq 'ARRAY' ) {
38 push( @res, @$a );
39 }
40 else {
41 push( @res, $a );
42 }
43 }
44 return \@res;
45}
46
4713µs1;
48__END__