← 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:27:18 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/OP_comma.pm
StatementsExecuted 16 statements in 428µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
42296µs150µsFoswiki::Query::OP_comma::::newFoswiki::Query::OP_comma::new
11136µs43µsFoswiki::Query::OP_comma::::BEGIN@12Foswiki::Query::OP_comma::BEGIN@12
11116µs34µsFoswiki::Query::OP_comma::::BEGIN@13Foswiki::Query::OP_comma::BEGIN@13
1119µs9µ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
12248µs251µs
# spent 43µs (36+7) within Foswiki::Query::OP_comma::BEGIN@12 which was called: # once (36µs+7µs) by Foswiki::Query::Node::BEGIN@75 at line 12
use strict;
# spent 43µs making 1 call to Foswiki::Query::OP_comma::BEGIN@12 # spent 7µs making 1 call to strict::import
13244µs252µs
# spent 34µs (16+18) within Foswiki::Query::OP_comma::BEGIN@13 which was called: # once (16µs+18µs) by Foswiki::Query::Node::BEGIN@75 at line 13
use warnings;
# spent 34µs making 1 call to Foswiki::Query::OP_comma::BEGIN@13 # spent 18µs making 1 call to warnings::import
14
152238µs19µs
# spent 9µs within Foswiki::Query::OP_comma::BEGIN@15 which was called: # once (9µs+0s) by Foswiki::Query::Node::BEGIN@75 at line 15
use Foswiki::Query::OP ();
# spent 9µs making 1 call to Foswiki::Query::OP_comma::BEGIN@15
1619µsour @ISA = ('Foswiki::Query::OP');
17
18
# spent 150µs (96+54) within Foswiki::Query::OP_comma::new which was called 4 times, avg 37µs/call: # 3 times (64µs+36µs) by Foswiki::Query::Parser::new at line 105 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Parser.pm, avg 33µs/call # once (32µs+18µs) by Foswiki::Query::Node::BEGIN@75 at line 79 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Node.pm
sub new {
1947µs my $class = shift;
20
21 # Treated as arity 2 for parsing, but folds to n-ary
22477µs454µs return $class->SUPER::new(
# spent 54µs making 4 calls to Foswiki::Query::OP::new, avg 14µ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
4716µs1;
48__END__