← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:26:56 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/If/OP_istopic.pm
StatementsExecuted 70 statements in 709µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
611332µs1.92msFoswiki::If::OP_istopic::::evaluateFoswiki::If::OP_istopic::evaluate
11132µs66µsFoswiki::If::OP_istopic::::newFoswiki::If::OP_istopic::new
11131µs77µsFoswiki::If::OP_istopic::::BEGIN@11Foswiki::If::OP_istopic::BEGIN@11
11119µs38µsFoswiki::If::OP_istopic::::BEGIN@12Foswiki::If::OP_istopic::BEGIN@12
11110µs10µsFoswiki::If::OP_istopic::::BEGIN@14Foswiki::If::OP_istopic::BEGIN@14
Call graph for these subroutines as a Graphviz dot language file.
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
9package Foswiki::If::OP_istopic;
10
11252µs2122µ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
use strict;
# spent 77µs making 1 call to Foswiki::If::OP_istopic::BEGIN@11 # spent 46µs making 1 call to strict::import
12248µs257µ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
use warnings;
# spent 38µs making 1 call to Foswiki::If::OP_istopic::BEGIN@12 # spent 19µs making 1 call to warnings::import
13
142278µs110µ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
use Foswiki::Query::UnaryOP ();
# spent 10µs making 1 call to Foswiki::If::OP_istopic::BEGIN@14
1519µsour @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
sub new {
18232µs my $class = shift;
19134µ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
sub evaluate {
2360285µs my $this = shift;
24 my $node = shift;
25 my $a = $node->{params}->[0];
26 my %domain = @_;
27626µ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;
31650µ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
336368µs ( $web, $topic ) = $session->normalizeWebTopicName( $web, $topic );
# spent 368µs making 6 calls to Foswiki::normalizeWebTopicName, avg 61µs/call
3461.15ms return $session->topicExists( $web, $topic ) ? 1 : 0;
# spent 1.15ms making 6 calls to Foswiki::topicExists, avg 191µs/call
35}
36
3716µs1;
38__END__