Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/If/OP_context.pm |
Statements | Executed 274 statements in 1.37ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
33 | 1 | 1 | 1.13ms | 1.81ms | evaluate | Foswiki::If::OP_context::
1 | 1 | 1 | 27µs | 36µs | BEGIN@11 | Foswiki::If::OP_context::
1 | 1 | 1 | 27µs | 57µs | new | Foswiki::If::OP_context::
1 | 1 | 1 | 21µs | 39µs | BEGIN@12 | Foswiki::If::OP_context::
1 | 1 | 1 | 9µs | 9µ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 | 52µs | 2 | 44µs | # spent 36µs (27+8) within Foswiki::If::OP_context::BEGIN@11 which was called:
# once (27µs+8µs) by Foswiki::If::Parser::BEGIN@23 at line 11 # spent 36µs making 1 call to Foswiki::If::OP_context::BEGIN@11
# spent 8µs making 1 call to strict::import |
12 | 2 | 45µs | 2 | 58µs | # spent 39µs (21+18) within Foswiki::If::OP_context::BEGIN@12 which was called:
# once (21µs+18µs) by Foswiki::If::Parser::BEGIN@23 at line 12 # spent 39µs making 1 call to Foswiki::If::OP_context::BEGIN@12
# spent 18µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 237µs | 1 | 9µs | # spent 9µs within Foswiki::If::OP_context::BEGIN@14 which was called:
# once (9µs+0s) by Foswiki::If::Parser::BEGIN@23 at line 14 # spent 9µs making 1 call to Foswiki::If::OP_context::BEGIN@14 |
15 | 1 | 10µs | our @ISA = ('Foswiki::Query::UnaryOP'); | ||
16 | |||||
17 | # spent 57µs (27+29) within Foswiki::If::OP_context::new which was called:
# once (27µ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 | 2 | 32µs | my $class = shift; | ||
19 | 1 | 29µs | return $class->SUPER::new( # spent 29µs making 1 call to Foswiki::Query::UnaryOP::new | ||
20 | name => 'context', | ||||
21 | prec => 600, | ||||
22 | casematters => 0 | ||||
23 | ); | ||||
24 | } | ||||
25 | |||||
26 | # spent 1.81ms (1.13+678µs) within Foswiki::If::OP_context::evaluate which was called 33 times, avg 55µs/call:
# 33 times (1.13ms+678µs) by Foswiki::Query::Node::evaluate at line 223 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Node.pm, avg 55µs/call | ||||
27 | 264 | 986µs | my $this = shift; | ||
28 | my $node = shift; | ||||
29 | my $a = $node->{params}->[0]; | ||||
30 | 33 | 306µs | my $text = $a->_evaluate(@_) || ''; # spent 306µs making 33 calls to Foswiki::If::Node::_evaluate, avg 9µs/call | ||
31 | my %domain = @_; | ||||
32 | 33 | 149µs | my $session = $domain{tom}->session; # spent 149µs making 33 calls to Foswiki::Meta::session, avg 5µs/call | ||
33 | throw Error::Simple( | ||||
34 | 'No context in which to evaluate "' . $a->stringify() . '"' ) | ||||
35 | unless $session; | ||||
36 | 33 | 223µs | return $session->inContext($text) || 0; # spent 223µs making 33 calls to Foswiki::inContext, avg 7µs/call | ||
37 | } | ||||
38 | |||||
39 | 1 | 6µs | 1; | ||
40 | __END__ |