Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/If/OP_istopic.pm |
Statements | Executed 70 statements in 709µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
6 | 1 | 1 | 332µs | 1.92ms | evaluate | Foswiki::If::OP_istopic::
1 | 1 | 1 | 32µs | 66µs | new | Foswiki::If::OP_istopic::
1 | 1 | 1 | 31µs | 77µs | BEGIN@11 | Foswiki::If::OP_istopic::
1 | 1 | 1 | 19µs | 38µs | BEGIN@12 | Foswiki::If::OP_istopic::
1 | 1 | 1 | 10µs | 10µs | BEGIN@14 | Foswiki::If::OP_istopic::
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_istopic | ||||
6 | |||||
7 | =cut | ||||
8 | |||||
9 | package Foswiki::If::OP_istopic; | ||||
10 | |||||
11 | 2 | 52µs | 2 | 122µs | # spent 77µs (31+46) within Foswiki::If::OP_istopic::BEGIN@11 which was called:
# once (31µs+46µs) by Foswiki::If::Parser::BEGIN@28 at line 11 # spent 77µs making 1 call to Foswiki::If::OP_istopic::BEGIN@11
# spent 46µs making 1 call to strict::import |
12 | 2 | 48µs | 2 | 57µs | # spent 38µs (19+19) within Foswiki::If::OP_istopic::BEGIN@12 which was called:
# once (19µs+19µs) by Foswiki::If::Parser::BEGIN@28 at line 12 # spent 38µs making 1 call to Foswiki::If::OP_istopic::BEGIN@12
# spent 19µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 278µs | 1 | 10µs | # spent 10µs within Foswiki::If::OP_istopic::BEGIN@14 which was called:
# once (10µs+0s) by Foswiki::If::Parser::BEGIN@28 at line 14 # spent 10µs making 1 call to Foswiki::If::OP_istopic::BEGIN@14 |
15 | 1 | 9µs | our @ISA = ('Foswiki::Query::UnaryOP'); | ||
16 | |||||
17 | # spent 66µs (32+34) within Foswiki::If::OP_istopic::new which was called:
# once (32µs+34µ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 | 34µs | return $class->SUPER::new( name => 'istopic', prec => 600 ); # spent 34µs making 1 call to Foswiki::Query::UnaryOP::new | ||
20 | } | ||||
21 | |||||
22 | # spent 1.92ms (332µs+1.59) within Foswiki::If::OP_istopic::evaluate which was called 6 times, avg 320µs/call:
# 6 times (332µs+1.59ms) by Foswiki::Query::Node::evaluate at line 223 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Node.pm, avg 320µs/call | ||||
23 | 60 | 285µs | my $this = shift; | ||
24 | my $node = shift; | ||||
25 | my $a = $node->{params}->[0]; | ||||
26 | my %domain = @_; | ||||
27 | 6 | 26µs | my $session = $domain{tom}->session; # spent 26µs making 6 calls to Foswiki::Meta::session, avg 4µs/call | ||
28 | throw Error::Simple( | ||||
29 | 'No context in which to evaluate "' . $a->stringify() . '"' ) | ||||
30 | unless $session; | ||||
31 | 6 | 50µs | my ( $web, $topic ) = ( $session->{webName}, $a->_evaluate(@_) ); # spent 50µs making 6 calls to Foswiki::If::Node::_evaluate, avg 8µs/call | ||
32 | return 0 unless defined $topic; # null topic cannot possibly exist | ||||
33 | 6 | 368µs | ( $web, $topic ) = $session->normalizeWebTopicName( $web, $topic ); # spent 368µs making 6 calls to Foswiki::normalizeWebTopicName, avg 61µs/call | ||
34 | 6 | 1.15ms | return $session->topicExists( $web, $topic ) ? 1 : 0; # spent 1.15ms making 6 calls to Foswiki::topicExists, avg 191µs/call | ||
35 | } | ||||
36 | |||||
37 | 1 | 6µs | 1; | ||
38 | __END__ |