← 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_context.pm
StatementsExecuted 74 statements in 445µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
811174µs259µsFoswiki::If::OP_context::::evaluateFoswiki::If::OP_context::evaluate
11123µs50µsFoswiki::If::OP_context::::newFoswiki::If::OP_context::new
11120µs38µsFoswiki::If::OP_context::::BEGIN@11Foswiki::If::OP_context::BEGIN@11
11114µs21µsFoswiki::If::OP_context::::BEGIN@12Foswiki::If::OP_context::BEGIN@12
1115µs5µ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
11237µs255µs
# spent 38µs (20+17) within Foswiki::If::OP_context::BEGIN@11 which was called: # once (20µs+17µs) by Foswiki::If::Parser::new at line 11
use strict;
# spent 38µs making 1 call to Foswiki::If::OP_context::BEGIN@11 # spent 17µs making 1 call to strict::import
12233µs228µs
# spent 21µs (14+7) within Foswiki::If::OP_context::BEGIN@12 which was called: # once (14µs+7µs) by Foswiki::If::Parser::new at line 12
use warnings;
# spent 21µs making 1 call to Foswiki::If::OP_context::BEGIN@12 # spent 7µs making 1 call to warnings::import
13
142201µs15µs
# spent 5µs within Foswiki::If::OP_context::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_context::BEGIN@14
1519µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 50µs (23+27) within Foswiki::If::OP_context::new which was called: # once (23µs+27µs) by Foswiki::If::Parser::new at line 31 of /var/www/foswiki11/lib/Foswiki/If/Parser.pm
sub new {
181800ns my $class = shift;
19122µs127µs return $class->SUPER::new(
# spent 27µs making 1 call to Foswiki::Query::UnaryOP::new
20 name => 'context',
21 prec => 600,
22 casematters => 0
23 );
24}
25
26
# spent 259µs (174+86) within Foswiki::If::OP_context::evaluate which was called 8 times, avg 32µs/call: # 8 times (174µs+86µs) by Foswiki::Query::Node::evaluate at line 184 of /var/www/foswiki11/lib/Foswiki/Query/Node.pm, avg 32µs/call
sub evaluate {
2784µs my $this = shift;
2882µs my $node = shift;
2985µs my $a = $node->{params}->[0];
30821µs827µs my $text = $a->_evaluate(@_) || '';
# spent 27µs making 8 calls to Foswiki::If::Node::_evaluate, avg 3µs/call
31823µs my %domain = @_;
32833µs829µs my $session = $domain{tom}->session;
# spent 29µs making 8 calls to Foswiki::Meta::session, avg 4µs/call
3383µs throw Error::Simple(
34 'No context in which to evaluate "' . $a->stringify() . '"' )
35 unless $session;
36850µs830µs return $session->inContext($text) || 0;
# spent 30µs making 8 calls to Foswiki::inContext, avg 4µs/call
37}
38
3914µs1;
40__END__