Filename | /var/www/foswiki11/lib/Foswiki/If/OP_context.pm |
Statements | Executed 74 statements in 445µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
8 | 1 | 1 | 174µs | 259µs | evaluate | Foswiki::If::OP_context::
1 | 1 | 1 | 23µs | 50µs | new | Foswiki::If::OP_context::
1 | 1 | 1 | 20µs | 38µs | BEGIN@11 | Foswiki::If::OP_context::
1 | 1 | 1 | 14µs | 21µs | BEGIN@12 | Foswiki::If::OP_context::
1 | 1 | 1 | 5µs | 5µs | BEGIN@14 | Foswiki::If::OP_context::
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 | |||||
9 | package Foswiki::If::OP_context; | ||||
10 | |||||
11 | 2 | 37µs | 2 | 55µs | # spent 38µs (20+17) within Foswiki::If::OP_context::BEGIN@11 which was called:
# once (20µs+17µs) by Foswiki::If::Parser::new at line 11 # spent 38µs making 1 call to Foswiki::If::OP_context::BEGIN@11
# spent 17µs making 1 call to strict::import |
12 | 2 | 33µs | 2 | 28µs | # spent 21µs (14+7) within Foswiki::If::OP_context::BEGIN@12 which was called:
# once (14µs+7µs) by Foswiki::If::Parser::new at line 12 # spent 21µs making 1 call to Foswiki::If::OP_context::BEGIN@12
# spent 7µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 201µs | 1 | 5µs | # spent 5µs within Foswiki::If::OP_context::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_context::BEGIN@14 |
15 | 1 | 9µs | our @ISA = ('Foswiki::Query::UnaryOP'); | ||
16 | |||||
17 | # spent 50µs (23+27) within Foswiki::If::OP_context::new which was called:
# once (23µs+27µ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 | 22µs | 1 | 27µs | return $class->SUPER::new( # spent 27µs making 1 call to Foswiki::Query::UnaryOP::new |
20 | name => 'context', | ||||
21 | prec => 600, | ||||
22 | casematters => 0 | ||||
23 | ); | ||||
24 | } | ||||
25 | |||||
26 | # spent 259µs (174+86) within Foswiki::If::OP_context::evaluate which was called 8 times, avg 32µs/call:
# 8 times (174µs+86µs) by Foswiki::Query::Node::evaluate at line 184 of /var/www/foswiki11/lib/Foswiki/Query/Node.pm, avg 32µs/call | ||||
27 | 8 | 4µs | my $this = shift; | ||
28 | 8 | 2µs | my $node = shift; | ||
29 | 8 | 5µs | my $a = $node->{params}->[0]; | ||
30 | 8 | 21µs | 8 | 27µs | my $text = $a->_evaluate(@_) || ''; # spent 27µs making 8 calls to Foswiki::If::Node::_evaluate, avg 3µs/call |
31 | 8 | 23µs | my %domain = @_; | ||
32 | 8 | 33µs | 8 | 29µs | my $session = $domain{tom}->session; # spent 29µs making 8 calls to Foswiki::Meta::session, avg 4µs/call |
33 | 8 | 3µs | throw Error::Simple( | ||
34 | 'No context in which to evaluate "' . $a->stringify() . '"' ) | ||||
35 | unless $session; | ||||
36 | 8 | 50µs | 8 | 30µs | return $session->inContext($text) || 0; # spent 30µs making 8 calls to Foswiki::inContext, avg 4µs/call |
37 | } | ||||
38 | |||||
39 | 1 | 4µs | 1; | ||
40 | __END__ |