Filename | /var/www/foswikidev/core/lib/Foswiki/If/OP_dollar.pm |
Statements | Executed 187 statements in 496µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
16 | 1 | 1 | 256µs | 4.37ms | evaluate | Foswiki::If::OP_dollar::
1 | 1 | 1 | 15µs | 27µs | BEGIN@11 | Foswiki::If::OP_dollar::
1 | 1 | 1 | 14µs | 27µs | new | Foswiki::If::OP_dollar::
1 | 1 | 1 | 8µs | 12µs | BEGIN@12 | Foswiki::If::OP_dollar::
1 | 1 | 1 | 4µs | 4µs | BEGIN@17 | Foswiki::If::OP_dollar::
1 | 1 | 1 | 3µs | 3µ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 | 25µs | 2 | 39µs | # spent 27µs (15+12) within Foswiki::If::OP_dollar::BEGIN@11 which was called:
# once (15µs+12µs) by Foswiki::If::Parser::BEGIN@25 at line 11 # spent 27µs making 1 call to Foswiki::If::OP_dollar::BEGIN@11
# spent 12µs making 1 call to strict::import |
12 | 2 | 23µs | 2 | 16µs | # spent 12µs (8+4) within Foswiki::If::OP_dollar::BEGIN@12 which was called:
# once (8µs+4µs) by Foswiki::If::Parser::BEGIN@25 at line 12 # spent 12µs making 1 call to Foswiki::If::OP_dollar::BEGIN@12
# spent 4µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 48µs | 1 | 3µs | # spent 3µs within Foswiki::If::OP_dollar::BEGIN@14 which was called:
# once (3µs+0s) by Foswiki::If::Parser::BEGIN@25 at line 14 # spent 3µs making 1 call to Foswiki::If::OP_dollar::BEGIN@14 |
15 | 1 | 7µs | our @ISA = ('Foswiki::Query::UnaryOP'); | ||
16 | |||||
17 | # spent 4µs within Foswiki::If::OP_dollar::BEGIN@17 which was called:
# once (4µs+0s) by Foswiki::If::Parser::BEGIN@25 at line 22 | ||||
18 | 1 | 10µs | if ( $Foswiki::cfg{UseLocale} ) { | ||
19 | require locale; | ||||
20 | import locale(); | ||||
21 | } | ||||
22 | 1 | 152µs | 1 | 4µs | } # spent 4µs making 1 call to Foswiki::If::OP_dollar::BEGIN@17 |
23 | |||||
24 | # spent 27µs (14+13) within Foswiki::If::OP_dollar::new which was called:
# once (14µs+13µs) by Foswiki::If::Parser::new at line 49 of /var/www/foswikidev/core/lib/Foswiki/If/Parser.pm | ||||
25 | 1 | 300ns | my $class = shift; | ||
26 | 1 | 14µs | 1 | 13µs | return $class->SUPER::new( # spent 13µs making 1 call to Foswiki::Query::UnaryOP::new |
27 | name => '$', | ||||
28 | prec => 600 | ||||
29 | ); | ||||
30 | } | ||||
31 | |||||
32 | # spent 4.37ms (256µs+4.12) within Foswiki::If::OP_dollar::evaluate which was called 16 times, avg 273µs/call:
# 16 times (256µs+4.12ms) by Foswiki::Query::Node::evaluate at line 223 of /var/www/foswikidev/core/lib/Foswiki/Query/Node.pm, avg 273µs/call | ||||
33 | 16 | 4µs | my $this = shift; | ||
34 | 16 | 3µs | my $node = shift; | ||
35 | 16 | 7µs | my $a = $node->{params}->[0]; | ||
36 | 16 | 11µs | my %domain = @_; | ||
37 | 16 | 26µs | 16 | 24µs | my $session = $domain{tom}->session; # spent 24µs making 16 calls to Foswiki::Meta::session, avg 2µs/call |
38 | 16 | 4µs | throw Error::Simple( | ||
39 | 'No context in which to evaluate "' . $a->stringify() . '"' ) | ||||
40 | unless $session; | ||||
41 | 16 | 28µs | 16 | 33µs | my $text = $a->_evaluate(@_) || ''; # spent 33µs making 16 calls to Foswiki::If::Node::_evaluate, avg 2µs/call |
42 | 16 | 32µs | 16 | 290µs | if ( $text && defined( $session->{request}->param($text) ) ) { # spent 290µs making 16 calls to Foswiki::Request::param, avg 18µs/call |
43 | return $session->{request}->param($text); | ||||
44 | } | ||||
45 | |||||
46 | 16 | 20µs | $text = "%$text%"; | ||
47 | 16 | 33µs | 16 | 0s | Foswiki::innerExpandMacros( $session, \$text, $domain{tom} ); # spent 3.77ms making 16 calls to Foswiki::innerExpandMacros, avg 236µs/call, recursion: max depth 3, sum of overlapping time 3.77ms |
48 | |||||
49 | 16 | 47µs | return $text || ''; | ||
50 | } | ||||
51 | |||||
52 | 1 | 3µs | 1; | ||
53 | __END__ |