← 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/If/OP_defined.pm
StatementsExecuted 162 statements in 550µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1211248µs923µsFoswiki::If::OP_defined::::evaluateFoswiki::If::OP_defined::evaluate
11126µs50µsFoswiki::If::OP_defined::::newFoswiki::If::OP_defined::new
11119µs38µsFoswiki::If::OP_defined::::BEGIN@11Foswiki::If::OP_defined::BEGIN@11
11112µs19µsFoswiki::If::OP_defined::::BEGIN@12Foswiki::If::OP_defined::BEGIN@12
1115µs5µsFoswiki::If::OP_defined::::BEGIN@14Foswiki::If::OP_defined::BEGIN@14
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_defined
6
7=cut
8
9package Foswiki::If::OP_defined;
10
11237µs256µs
# spent 38µs (19+18) within Foswiki::If::OP_defined::BEGIN@11 which was called: # once (19µs+18µs) by Foswiki::If::Parser::new at line 11
use strict;
# spent 38µs making 1 call to Foswiki::If::OP_defined::BEGIN@11 # spent 18µs making 1 call to strict::import
12237µs226µs
# spent 19µs (12+7) within Foswiki::If::OP_defined::BEGIN@12 which was called: # once (12µs+7µs) by Foswiki::If::Parser::new at line 12
use warnings;
# spent 19µs making 1 call to Foswiki::If::OP_defined::BEGIN@12 # spent 7µs making 1 call to warnings::import
13
142245µs15µs
# spent 5µs within Foswiki::If::OP_defined::BEGIN@14 which was called: # once (5µs+0s) by Foswiki::If::Parser::new at line 14
use Foswiki::Query::UnaryOP ();
# spent 5µs making 1 call to Foswiki::If::OP_defined::BEGIN@14
1519µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 50µs (26+25) within Foswiki::If::OP_defined::new which was called: # once (26µs+25µs) by Foswiki::If::Parser::new at line 31 of /var/www/foswiki11/lib/Foswiki/If/Parser.pm
sub new {
181800ns my $class = shift;
19123µs124µs return $class->SUPER::new( name => 'defined', prec => 600 );
# spent 24µs making 1 call to Foswiki::Query::UnaryOP::new
20}
21
22
# spent 923µs (248+675) within Foswiki::If::OP_defined::evaluate which was called 12 times, avg 77µs/call: # 12 times (248µs+675µs) by Foswiki::Query::Node::evaluate at line 184 of /var/www/foswiki11/lib/Foswiki/Query/Node.pm, avg 77µs/call
sub evaluate {
23123µs my $this = shift;
24122µs my $node = shift;
25125µs my $a = $node->{params}->[0];
261218µs my %domain = @_;
271223µs1219µs my $session = $domain{tom}->session;
# spent 19µs making 12 calls to Foswiki::Meta::session, avg 2µs/call
28123µs throw Error::Simple(
29 'No context in which to evaluate "' . $a->stringify() . '"' )
30 unless $session;
311222µs1229µs my $eval = $a->_evaluate(@_);
# spent 29µs making 12 calls to Foswiki::If::Node::_evaluate, avg 2µs/call
32122µs return 0 unless $eval;
331226µs12244µs return 1 if ( defined( $session->{request}->param($eval) ) );
# spent 244µs making 12 calls to Foswiki::Request::param, avg 20µs/call
341227µs1294µs return 1 if ( defined( $domain{tom}->getPreference($eval) ) );
# spent 94µs making 12 calls to Foswiki::Meta::getPreference, avg 8µs/call
351228µs12289µs return 1 if ( defined( $session->{prefs}->getPreference($eval) ) );
# spent 289µs making 12 calls to Foswiki::Prefs::getPreference, avg 24µs/call
36105µs return 1 if ( exists( $Foswiki::macros{$eval} ) );
371030µs return 0;
38}
39
4014µs1;
41__END__