← 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/UnaryOP.pm
StatementsExecuted 60 statements in 727µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
241212255µs472µsFoswiki::Query::UnaryOP::::newFoswiki::Query::UnaryOP::new
11121µs40µsFoswiki::Query::UnaryOP::::BEGIN@4Foswiki::Query::UnaryOP::BEGIN@4
11116µs31µsFoswiki::Query::UnaryOP::::BEGIN@33Foswiki::Query::UnaryOP::BEGIN@33
11112µs29µsFoswiki::Query::UnaryOP::::BEGIN@35Foswiki::Query::UnaryOP::BEGIN@35
11112µs19µsFoswiki::Query::UnaryOP::::BEGIN@5Foswiki::Query::UnaryOP::BEGIN@5
1118µs8µsFoswiki::Query::UnaryOP::::BEGIN@6Foswiki::Query::UnaryOP::BEGIN@6
0000s0sFoswiki::Query::UnaryOP::::evalUnaryFoswiki::Query::UnaryOP::evalUnary
0000s0sFoswiki::Query::UnaryOP::::evaluatesToConstantFoswiki::Query::UnaryOP::evaluatesToConstant
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
2package Foswiki::Query::UnaryOP;
3
4238µs258µs
# spent 40µs (21+18) within Foswiki::Query::UnaryOP::BEGIN@4 which was called: # once (21µs+18µs) by Foswiki::Query::OP_lc::BEGIN@14 at line 4
use strict;
# spent 40µs making 1 call to Foswiki::Query::UnaryOP::BEGIN@4 # spent 18µs making 1 call to strict::import
5240µs227µs
# spent 19µs (12+7) within Foswiki::Query::UnaryOP::BEGIN@5 which was called: # once (12µs+7µs) by Foswiki::Query::OP_lc::BEGIN@14 at line 5
use warnings;
# spent 19µs making 1 call to Foswiki::Query::UnaryOP::BEGIN@5 # spent 7µs making 1 call to warnings::import
62263µs18µs
# spent 8µs within Foswiki::Query::UnaryOP::BEGIN@6 which was called: # once (8µs+0s) by Foswiki::Query::OP_lc::BEGIN@14 at line 6
use Foswiki::Query::OP;
# spent 8µs making 1 call to Foswiki::Query::UnaryOP::BEGIN@6
719µsour @ISA = ('Foswiki::Query::OP');
8
9
# spent 472µs (255+217) within Foswiki::Query::UnaryOP::new which was called 24 times, avg 20µs/call: # 3 times (48µs+25µs) by Foswiki::Query::OP_lc::new at line 20 of /var/www/foswiki11/lib/Foswiki/Query/OP_lc.pm, avg 24µs/call # 3 times (28µs+24µs) by Foswiki::Query::OP_ob::new at line 19 of /var/www/foswiki11/lib/Foswiki/Query/OP_ob.pm, avg 17µs/call # 3 times (28µs+22µs) by Foswiki::Query::OP_not::new at line 19 of /var/www/foswiki11/lib/Foswiki/Query/OP_not.pm, avg 17µs/call # 3 times (28µs+22µs) by Foswiki::Query::OP_d2n::new at line 19 of /var/www/foswiki11/lib/Foswiki/Query/OP_d2n.pm, avg 16µs/call # 3 times (28µs+21µs) by Foswiki::Query::OP_length::new at line 19 of /var/www/foswiki11/lib/Foswiki/Query/OP_length.pm, avg 16µs/call # 3 times (27µs+22µs) by Foswiki::Query::OP_uc::new at line 20 of /var/www/foswiki11/lib/Foswiki/Query/OP_uc.pm, avg 16µs/call # once (11µs+16µs) by Foswiki::If::OP_context::new at line 19 of /var/www/foswiki11/lib/Foswiki/If/OP_context.pm # once (12µs+13µs) by Foswiki::If::OP_dollar::new at line 19 of /var/www/foswiki11/lib/Foswiki/If/OP_dollar.pm # once (12µs+13µs) by Foswiki::If::OP_istopic::new at line 19 of /var/www/foswiki11/lib/Foswiki/If/OP_istopic.pm # once (11µs+13µs) by Foswiki::If::OP_defined::new at line 19 of /var/www/foswiki11/lib/Foswiki/If/OP_defined.pm # once (11µs+13µs) by Foswiki::If::OP_isempty::new at line 19 of /var/www/foswiki11/lib/Foswiki/If/OP_isempty.pm # once (11µs+13µs) by Foswiki::If::OP_isweb::new at line 19 of /var/www/foswiki11/lib/Foswiki/If/OP_isweb.pm
sub new {
102410µs my $class = shift;
1124251µs24217µs return $class->SUPER::new( arity => 1, @_ );
# spent 217µs making 24 calls to Foswiki::Query::OP::new, avg 9µs/call
12}
13
14sub evalUnary {
15 my $this = shift;
16 my $node = shift;
17 my $sub = shift;
18 my $a = $node->{params}[0];
19 my $val = $a->evaluate(@_);
20 return undef unless defined $val;
21 if ( ref($val) eq 'ARRAY' ) {
22 my @res = map { &$sub($_) } @$val;
23 return \@res;
24 }
25 else {
26 return &$sub($val);
27 }
28}
29
30sub evaluatesToConstant {
31 my $this = shift;
32 my $node = shift;
33258µs246µs
# spent 31µs (16+15) within Foswiki::Query::UnaryOP::BEGIN@33 which was called: # once (16µs+15µs) by Foswiki::Query::OP_lc::BEGIN@14 at line 33
no warnings 'recursion';
# spent 31µs making 1 call to Foswiki::Query::UnaryOP::BEGIN@33 # spent 15µs making 1 call to warnings::unimport
34 return $node->{params}[0]->evaluatesToConstant(@_);
35255µs245µs
# spent 29µs (12+16) within Foswiki::Query::UnaryOP::BEGIN@35 which was called: # once (12µs+16µs) by Foswiki::Query::OP_lc::BEGIN@14 at line 35
use warnings 'recursion';
# spent 29µs making 1 call to Foswiki::Query::UnaryOP::BEGIN@35 # spent 16µs making 1 call to warnings::import
36}
37
3814µs1;
39__END__