← 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/If/OP_context.pm
StatementsExecuted 107 statements in 375µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1211143µs208µsFoswiki::If::OP_context::::evaluateFoswiki::If::OP_context::evaluate
11131µs44µsFoswiki::If::OP_context::::BEGIN@11Foswiki::If::OP_context::BEGIN@11
11118µs34µsFoswiki::If::OP_context::::newFoswiki::If::OP_context::new
11110µs14µsFoswiki::If::OP_context::::BEGIN@12Foswiki::If::OP_context::BEGIN@12
1114µs4µsFoswiki::If::OP_context::::BEGIN@17Foswiki::If::OP_context::BEGIN@17
1114µs4µsFoswiki::If::OP_context::::BEGIN@14Foswiki::If::OP_context::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_context
6
7=cut
8
9package Foswiki::If::OP_context;
10
11232µs257µs
# spent 44µs (31+13) within Foswiki::If::OP_context::BEGIN@11 which was called: # once (31µs+13µs) by Foswiki::If::Parser::BEGIN@23 at line 11
use strict;
# spent 44µs making 1 call to Foswiki::If::OP_context::BEGIN@11 # spent 13µs making 1 call to strict::import
12224µs219µs
# spent 14µs (10+4) within Foswiki::If::OP_context::BEGIN@12 which was called: # once (10µs+4µs) by Foswiki::If::Parser::BEGIN@23 at line 12
use warnings;
# spent 14µs making 1 call to Foswiki::If::OP_context::BEGIN@12 # spent 4µs making 1 call to warnings::import
13
14249µs14µs
# spent 4µs within Foswiki::If::OP_context::BEGIN@14 which was called: # once (4µs+0s) by Foswiki::If::Parser::BEGIN@23 at line 14
use Foswiki::Query::UnaryOP ();
# spent 4µs making 1 call to Foswiki::If::OP_context::BEGIN@14
1517µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 4µs within Foswiki::If::OP_context::BEGIN@17 which was called: # once (4µs+0s) by Foswiki::If::Parser::BEGIN@23 at line 22
BEGIN {
1814µs if ( $Foswiki::cfg{UseLocale} ) {
19 require locale;
20 import locale();
21 }
221134µs14µs}
# spent 4µs making 1 call to Foswiki::If::OP_context::BEGIN@17
23
24
# spent 34µs (18+16) within Foswiki::If::OP_context::new which was called: # once (18µs+16µs) by Foswiki::If::Parser::new at line 49 of /var/www/foswikidev/core/lib/Foswiki/If/Parser.pm
sub new {
251400ns my $class = shift;
26116µs116µs return $class->SUPER::new(
# spent 16µs making 1 call to Foswiki::Query::UnaryOP::new
27 name => 'context',
28 prec => 600,
29 casematters => 0
30 );
31}
32
33
# spent 208µs (143+65) within Foswiki::If::OP_context::evaluate which was called 12 times, avg 17µs/call: # 12 times (143µs+65µs) by Foswiki::Query::Node::evaluate at line 223 of /var/www/foswikidev/core/lib/Foswiki/Query/Node.pm, avg 17µs/call
sub evaluate {
34123µs my $this = shift;
35122µs my $node = shift;
36126µs my $a = $node->{params}->[0];
371217µs1221µs my $text = $a->_evaluate(@_) || '';
# spent 21µs making 12 calls to Foswiki::If::Node::_evaluate, avg 2µs/call
381212µs my %domain = @_;
391219µs1217µs my $session = $domain{tom}->session;
# spent 17µs making 12 calls to Foswiki::Meta::session, avg 1µs/call
40122µs throw Error::Simple(
41 'No context in which to evaluate "' . $a->stringify() . '"' )
42 unless $session;
431244µs1228µs return $session->inContext($text) || 0;
# spent 28µs making 12 calls to Foswiki::inContext, avg 2µs/call
44}
45
4613µs1;
47__END__