Filename | /var/www/foswiki11/lib/Foswiki/If/OP_dollar.pm |
Statements | Executed 208 statements in 733µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
18 | 1 | 1 | 407µs | 6.96ms | evaluate | Foswiki::If::OP_dollar::
1 | 1 | 1 | 33µs | 58µs | new | Foswiki::If::OP_dollar::
1 | 1 | 1 | 19µs | 37µs | BEGIN@11 | Foswiki::If::OP_dollar::
1 | 1 | 1 | 13µs | 19µs | BEGIN@12 | Foswiki::If::OP_dollar::
1 | 1 | 1 | 5µs | 5µs | BEGIN@14 | Foswiki::If::OP_dollar::
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 | |||||
9 | package Foswiki::If::OP_dollar; | ||||
10 | |||||
11 | 2 | 37µs | 2 | 55µs | # spent 37µs (19+18) within Foswiki::If::OP_dollar::BEGIN@11 which was called:
# once (19µs+18µs) by Foswiki::If::Parser::new at line 11 # spent 37µs making 1 call to Foswiki::If::OP_dollar::BEGIN@11
# spent 18µs making 1 call to strict::import |
12 | 2 | 32µs | 2 | 26µs | # spent 19µs (13+7) within Foswiki::If::OP_dollar::BEGIN@12 which was called:
# once (13µs+7µs) by Foswiki::If::Parser::new at line 12 # spent 19µs making 1 call to Foswiki::If::OP_dollar::BEGIN@12
# spent 7µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 258µs | 1 | 5µs | # spent 5µs within Foswiki::If::OP_dollar::BEGIN@14 which was called:
# once (5µs+0s) by Foswiki::If::Parser::new at line 14 # spent 5µs making 1 call to Foswiki::If::OP_dollar::BEGIN@14 |
15 | 1 | 9µs | our @ISA = ('Foswiki::Query::UnaryOP'); | ||
16 | |||||
17 | # spent 58µs (33+25) within Foswiki::If::OP_dollar::new which was called:
# once (33µs+25µs) by Foswiki::If::Parser::new at line 31 of /var/www/foswiki11/lib/Foswiki/If/Parser.pm | ||||
18 | 1 | 800ns | my $class = shift; | ||
19 | 1 | 32µs | 1 | 25µs | return $class->SUPER::new( # spent 25µs making 1 call to Foswiki::Query::UnaryOP::new |
20 | name => '$', | ||||
21 | prec => 600 | ||||
22 | ); | ||||
23 | } | ||||
24 | |||||
25 | # spent 6.96ms (407µs+6.55) within Foswiki::If::OP_dollar::evaluate which was called 18 times, avg 387µs/call:
# 18 times (407µs+6.55ms) by Foswiki::Query::Node::evaluate at line 184 of /var/www/foswiki11/lib/Foswiki/Query/Node.pm, avg 387µs/call | ||||
26 | 18 | 6µs | my $this = shift; | ||
27 | 18 | 3µs | my $node = shift; | ||
28 | 18 | 10µs | my $a = $node->{params}->[0]; | ||
29 | 18 | 47µs | my %domain = @_; | ||
30 | 18 | 44µs | 18 | 37µs | my $session = $domain{tom}->session; # spent 37µs making 18 calls to Foswiki::Meta::session, avg 2µs/call |
31 | 18 | 6µs | throw Error::Simple( | ||
32 | 'No context in which to evaluate "' . $a->stringify() . '"' ) | ||||
33 | unless $session; | ||||
34 | 18 | 42µs | 18 | 54µs | my $text = $a->_evaluate(@_) || ''; # spent 54µs making 18 calls to Foswiki::If::Node::_evaluate, avg 3µs/call |
35 | 18 | 53µs | 18 | 450µs | if ( $text && defined( $session->{request}->param($text) ) ) { # spent 450µs making 18 calls to Foswiki::Request::param, avg 25µs/call |
36 | return $session->{request}->param($text); | ||||
37 | } | ||||
38 | |||||
39 | 18 | 18µs | $text = "%$text%"; | ||
40 | 18 | 59µs | 18 | 0s | Foswiki::innerExpandMacros( $session, \$text, $domain{tom} ); # spent 6.01ms making 18 calls to Foswiki::innerExpandMacros, avg 334µs/call, recursion: max depth 3, sum of overlapping time 6.01ms |
41 | |||||
42 | 18 | 74µs | return $text || ''; | ||
43 | } | ||||
44 | |||||
45 | 1 | 4µs | 1; | ||
46 | __END__ |