← 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_dollar.pm
StatementsExecuted 175 statements in 1.08ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1511691µs13.5msFoswiki::If::OP_dollar::::evaluateFoswiki::If::OP_dollar::evaluate
11128µs57µsFoswiki::If::OP_dollar::::newFoswiki::If::OP_dollar::new
11124µs32µsFoswiki::If::OP_dollar::::BEGIN@11Foswiki::If::OP_dollar::BEGIN@11
11116µs34µsFoswiki::If::OP_dollar::::BEGIN@12Foswiki::If::OP_dollar::BEGIN@12
1119µs9µsFoswiki::If::OP_dollar::::BEGIN@14Foswiki::If::OP_dollar::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_dollar
6
7=cut
8
9package Foswiki::If::OP_dollar;
10
11244µs239µs
# spent 32µs (24+7) within Foswiki::If::OP_dollar::BEGIN@11 which was called: # once (24µs+7µs) by Foswiki::If::Parser::BEGIN@25 at line 11
use strict;
# spent 32µs making 1 call to Foswiki::If::OP_dollar::BEGIN@11 # spent 7µs making 1 call to strict::import
12244µs251µs
# spent 34µs (16+17) within Foswiki::If::OP_dollar::BEGIN@12 which was called: # once (16µs+17µs) by Foswiki::If::Parser::BEGIN@25 at line 12
use warnings;
# spent 34µs making 1 call to Foswiki::If::OP_dollar::BEGIN@12 # spent 18µs making 1 call to warnings::import
13
142304µs19µs
# spent 9µs within Foswiki::If::OP_dollar::BEGIN@14 which was called: # once (9µs+0s) by Foswiki::If::Parser::BEGIN@25 at line 14
use Foswiki::Query::UnaryOP ();
# spent 9µs making 1 call to Foswiki::If::OP_dollar::BEGIN@14
1519µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 57µs (28+29) within Foswiki::If::OP_dollar::new which was called: # once (28µ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;
19126µs129µs return $class->SUPER::new(
# spent 29µs making 1 call to Foswiki::Query::UnaryOP::new
20 name => '$',
21 prec => 600
22 );
23}
24
25
# spent 13.5ms (691µs+12.8) within Foswiki::If::OP_dollar::evaluate which was called 15 times, avg 899µs/call: # 15 times (691µs+12.8ms) by Foswiki::Query::Node::evaluate at line 223 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Node.pm, avg 899µs/call
sub evaluate {
261522µs my $this = shift;
271520µs my $node = shift;
281528µs my $a = $node->{params}->[0];
291534µs my %domain = @_;
301586µs1564µs my $session = $domain{tom}->session;
# spent 64µs making 15 calls to Foswiki::Meta::session, avg 4µs/call
311520µs throw Error::Simple(
32 'No context in which to evaluate "' . $a->stringify() . '"' )
33 unless $session;
341592µs15124µs my $text = $a->_evaluate(@_) || '';
# spent 124µs making 15 calls to Foswiki::If::Node::_evaluate, avg 8µs/call
3515102µs15785µs if ( $text && defined( $session->{request}->param($text) ) ) {
# spent 785µs making 15 calls to Foswiki::Request::param, avg 52µs/call
36 return $session->{request}->param($text);
37 }
38
391532µs $text = "%$text%";
4015108µs150s Foswiki::innerExpandMacros( $session, \$text, $domain{tom} );
# spent 11.8ms making 15 calls to Foswiki::innerExpandMacros, avg 788µs/call, recursion: max depth 2, sum of overlapping time 11.8ms
41
421599µs return $text || '';
43}
44
4516µs1;
46__END__