← 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:26:35 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/If/OP_context.pm
StatementsExecuted 274 statements in 1.37ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
33111.13ms1.81msFoswiki::If::OP_context::::evaluateFoswiki::If::OP_context::evaluate
11127µs36µsFoswiki::If::OP_context::::BEGIN@11Foswiki::If::OP_context::BEGIN@11
11127µs57µsFoswiki::If::OP_context::::newFoswiki::If::OP_context::new
11121µs39µsFoswiki::If::OP_context::::BEGIN@12Foswiki::If::OP_context::BEGIN@12
1119µs9µ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
11252µs244µs
# spent 36µs (27+8) within Foswiki::If::OP_context::BEGIN@11 which was called: # once (27µs+8µs) by Foswiki::If::Parser::BEGIN@23 at line 11
use strict;
# spent 36µs making 1 call to Foswiki::If::OP_context::BEGIN@11 # spent 8µs making 1 call to strict::import
12245µs258µs
# spent 39µs (21+18) within Foswiki::If::OP_context::BEGIN@12 which was called: # once (21µs+18µs) by Foswiki::If::Parser::BEGIN@23 at line 12
use warnings;
# spent 39µs making 1 call to Foswiki::If::OP_context::BEGIN@12 # spent 18µs making 1 call to warnings::import
13
142237µs19µs
# spent 9µs within Foswiki::If::OP_context::BEGIN@14 which was called: # once (9µs+0s) by Foswiki::If::Parser::BEGIN@23 at line 14
use Foswiki::Query::UnaryOP ();
# spent 9µs making 1 call to Foswiki::If::OP_context::BEGIN@14
15110µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 57µs (27+29) within Foswiki::If::OP_context::new which was called: # once (27µ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 {
18232µs my $class = shift;
19129µs return $class->SUPER::new(
# spent 29µs making 1 call to Foswiki::Query::UnaryOP::new
20 name => 'context',
21 prec => 600,
22 casematters => 0
23 );
24}
25
26
# spent 1.81ms (1.13+678µs) within Foswiki::If::OP_context::evaluate which was called 33 times, avg 55µs/call: # 33 times (1.13ms+678µs) by Foswiki::Query::Node::evaluate at line 223 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Node.pm, avg 55µs/call
sub evaluate {
27264986µs my $this = shift;
28 my $node = shift;
29 my $a = $node->{params}->[0];
3033306µs my $text = $a->_evaluate(@_) || '';
# spent 306µs making 33 calls to Foswiki::If::Node::_evaluate, avg 9µs/call
31 my %domain = @_;
3233149µs my $session = $domain{tom}->session;
# spent 149µs making 33 calls to Foswiki::Meta::session, avg 5µs/call
33 throw Error::Simple(
34 'No context in which to evaluate "' . $a->stringify() . '"' )
35 unless $session;
3633223µs return $session->inContext($text) || 0;
# spent 223µs making 33 calls to Foswiki::inContext, avg 7µs/call
37}
38
3916µs1;
40__END__