Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/If/OP_dollar.pm |
Statements | Executed 175 statements in 1.08ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
15 | 1 | 1 | 691µs | 13.5ms | evaluate | Foswiki::If::OP_dollar::
1 | 1 | 1 | 28µs | 57µs | new | Foswiki::If::OP_dollar::
1 | 1 | 1 | 24µs | 32µs | BEGIN@11 | Foswiki::If::OP_dollar::
1 | 1 | 1 | 16µs | 34µs | BEGIN@12 | Foswiki::If::OP_dollar::
1 | 1 | 1 | 9µs | 9µ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 | 44µs | 2 | 39µ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 # spent 32µs making 1 call to Foswiki::If::OP_dollar::BEGIN@11
# spent 7µs making 1 call to strict::import |
12 | 2 | 44µs | 2 | 51µ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 # spent 34µs making 1 call to Foswiki::If::OP_dollar::BEGIN@12
# spent 18µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 304µs | 1 | 9µ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 # spent 9µs making 1 call to Foswiki::If::OP_dollar::BEGIN@14 |
15 | 1 | 9µs | our @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 | ||||
18 | 1 | 2µs | my $class = shift; | ||
19 | 1 | 26µs | 1 | 29µ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 | ||||
26 | 15 | 22µs | my $this = shift; | ||
27 | 15 | 20µs | my $node = shift; | ||
28 | 15 | 28µs | my $a = $node->{params}->[0]; | ||
29 | 15 | 34µs | my %domain = @_; | ||
30 | 15 | 86µs | 15 | 64µs | my $session = $domain{tom}->session; # spent 64µs making 15 calls to Foswiki::Meta::session, avg 4µs/call |
31 | 15 | 20µs | throw Error::Simple( | ||
32 | 'No context in which to evaluate "' . $a->stringify() . '"' ) | ||||
33 | unless $session; | ||||
34 | 15 | 92µs | 15 | 124µs | my $text = $a->_evaluate(@_) || ''; # spent 124µs making 15 calls to Foswiki::If::Node::_evaluate, avg 8µs/call |
35 | 15 | 102µs | 15 | 785µ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 | |||||
39 | 15 | 32µs | $text = "%$text%"; | ||
40 | 15 | 108µs | 15 | 0s | 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 | |||||
42 | 15 | 99µs | return $text || ''; | ||
43 | } | ||||
44 | |||||
45 | 1 | 6µs | 1; | ||
46 | __END__ |