Filename | /var/www/foswiki11/lib/Foswiki/If/OP_istopic.pm |
Statements | Executed 80 statements in 461µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
7 | 1 | 1 | 159µs | 856µs | evaluate | Foswiki::If::OP_istopic::
1 | 1 | 1 | 25µs | 49µs | new | Foswiki::If::OP_istopic::
1 | 1 | 1 | 18µs | 36µs | BEGIN@11 | Foswiki::If::OP_istopic::
1 | 1 | 1 | 13µs | 21µs | BEGIN@12 | Foswiki::If::OP_istopic::
1 | 1 | 1 | 5µs | 5µ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 | 46µs | 2 | 54µs | # spent 36µs (18+18) within Foswiki::If::OP_istopic::BEGIN@11 which was called:
# once (18µs+18µs) by Foswiki::If::Parser::new at line 11 # spent 36µs making 1 call to Foswiki::If::OP_istopic::BEGIN@11
# spent 18µs making 1 call to strict::import |
12 | 2 | 33µs | 2 | 28µs | # spent 21µs (13+7) within Foswiki::If::OP_istopic::BEGIN@12 which was called:
# once (13µs+7µs) by Foswiki::If::Parser::new at line 12 # spent 21µs making 1 call to Foswiki::If::OP_istopic::BEGIN@12
# spent 7µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 223µs | 1 | 5µs | # spent 5µs within Foswiki::If::OP_istopic::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_istopic::BEGIN@14 |
15 | 1 | 10µs | our @ISA = ('Foswiki::Query::UnaryOP'); | ||
16 | |||||
17 | # spent 49µs (25+25) within Foswiki::If::OP_istopic::new which was called:
# once (25µs+25µs) by Foswiki::If::Parser::new at line 31 of /var/www/foswiki11/lib/Foswiki/If/Parser.pm | ||||
18 | 1 | 700ns | my $class = shift; | ||
19 | 1 | 23µs | 1 | 25µs | return $class->SUPER::new( name => 'istopic', prec => 600 ); # spent 25µs making 1 call to Foswiki::Query::UnaryOP::new |
20 | } | ||||
21 | |||||
22 | # spent 856µs (159+697) within Foswiki::If::OP_istopic::evaluate which was called 7 times, avg 122µs/call:
# 7 times (159µs+697µs) by Foswiki::Query::Node::evaluate at line 184 of /var/www/foswiki11/lib/Foswiki/Query/Node.pm, avg 122µs/call | ||||
23 | 7 | 3µs | my $this = shift; | ||
24 | 7 | 2µs | my $node = shift; | ||
25 | 7 | 4µs | my $a = $node->{params}->[0]; | ||
26 | 7 | 13µs | my %domain = @_; | ||
27 | 7 | 13µs | 7 | 11µs | my $session = $domain{tom}->session; # spent 11µs making 7 calls to Foswiki::Meta::session, avg 2µs/call |
28 | 7 | 2µs | throw Error::Simple( | ||
29 | 'No context in which to evaluate "' . $a->stringify() . '"' ) | ||||
30 | unless $session; | ||||
31 | 7 | 20µs | 7 | 19µs | my ( $web, $topic ) = ( $session->{webName}, $a->_evaluate(@_) ); # spent 19µs making 7 calls to Foswiki::If::Node::_evaluate, avg 3µs/call |
32 | 7 | 2µs | return 0 unless defined $topic; # null topic cannot possibly exist | ||
33 | 7 | 21µs | 7 | 109µs | ( $web, $topic ) = $session->normalizeWebTopicName( $web, $topic ); # spent 109µs making 7 calls to Foswiki::normalizeWebTopicName, avg 16µs/call |
34 | 7 | 41µs | 7 | 558µs | return $session->topicExists( $web, $topic ) ? 1 : 0; # spent 558µs making 7 calls to Foswiki::topicExists, avg 80µs/call |
35 | } | ||||
36 | |||||
37 | 1 | 4µs | 1; | ||
38 | __END__ |