← 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:21 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/If/OP_isempty.pm
StatementsExecuted 10 statements in 407µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11131µs60µsFoswiki::If::OP_isempty::::newFoswiki::If::OP_isempty::new
11124µs32µsFoswiki::If::OP_isempty::::BEGIN@11Foswiki::If::OP_isempty::BEGIN@11
11116µs34µsFoswiki::If::OP_isempty::::BEGIN@12Foswiki::If::OP_isempty::BEGIN@12
1118µs8µsFoswiki::If::OP_isempty::::BEGIN@14Foswiki::If::OP_isempty::BEGIN@14
0000s0sFoswiki::If::OP_isempty::::evaluateFoswiki::If::OP_isempty::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::If::OP_isempty
6
7=cut
8
9package Foswiki::If::OP_isempty;
10
11245µs240µs
# spent 32µs (24+8) within Foswiki::If::OP_isempty::BEGIN@11 which was called: # once (24µs+8µs) by Foswiki::If::Parser::BEGIN@27 at line 11
use strict;
# spent 32µs making 1 call to Foswiki::If::OP_isempty::BEGIN@11 # spent 8µs making 1 call to strict::import
12244µs252µs
# spent 34µs (16+18) within Foswiki::If::OP_isempty::BEGIN@12 which was called: # once (16µs+18µs) by Foswiki::If::Parser::BEGIN@27 at line 12
use warnings;
# spent 34µs making 1 call to Foswiki::If::OP_isempty::BEGIN@12 # spent 18µs making 1 call to warnings::import
13
142269µs18µs
# spent 8µs within Foswiki::If::OP_isempty::BEGIN@14 which was called: # once (8µs+0s) by Foswiki::If::Parser::BEGIN@27 at line 14
use Foswiki::Query::UnaryOP ();
# spent 8µs making 1 call to Foswiki::If::OP_isempty::BEGIN@14
1519µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 60µs (31+29) within Foswiki::If::OP_isempty::new which was called: # once (31µs+29µs) by Foswiki::If::Parser::new at line 42 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/If/Parser.pm
sub new {
1812µs my $class = shift;
19133µs129µs return $class->SUPER::new( name => 'isempty', prec => 600 );
# spent 29µs making 1 call to Foswiki::Query::UnaryOP::new
20}
21
22sub evaluate {
23 my $this = shift;
24 my $node = shift;
25 my $a = $node->{params}->[0];
26 my %domain = @_;
27 my $session = $domain{tom}->session;
28 throw Error::Simple(
29 'No context in which to evaluate "' . $a->stringify() . '"' )
30 unless $session;
31 my $eval = $a->_evaluate(@_);
32 return 1 unless $eval;
33 return 0 if ( $session->{request}->param($eval) );
34 return 0 if ( $session->{prefs}->getPreference($eval) );
35 return 1;
36}
37
3816µs1;
39__END__