← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 19:05:14 2015
Reported on Fri Jul 31 19:08:10 2015

Filename/var/www/foswiki11/lib/Foswiki/If/OP_isweb.pm
StatementsExecuted 10 statements in 298µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11124µs47µsFoswiki::If::OP_isweb::::newFoswiki::If::OP_isweb::new
11121µs39µsFoswiki::If::OP_isweb::::BEGIN@11Foswiki::If::OP_isweb::BEGIN@11
11117µs24µsFoswiki::If::OP_isweb::::BEGIN@12Foswiki::If::OP_isweb::BEGIN@12
1115µs5µsFoswiki::If::OP_isweb::::BEGIN@14Foswiki::If::OP_isweb::BEGIN@14
0000s0sFoswiki::If::OP_isweb::::evaluateFoswiki::If::OP_isweb::evaluate
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_isweb
6
7=cut
8
9package Foswiki::If::OP_isweb;
10
11241µs258µs
# spent 39µs (21+18) within Foswiki::If::OP_isweb::BEGIN@11 which was called: # once (21µs+18µs) by Foswiki::If::Parser::new at line 11
use strict;
# spent 39µs making 1 call to Foswiki::If::OP_isweb::BEGIN@11 # spent 18µs making 1 call to strict::import
12235µs232µs
# spent 24µs (17+7) within Foswiki::If::OP_isweb::BEGIN@12 which was called: # once (17µs+7µs) by Foswiki::If::Parser::new at line 12
use warnings;
# spent 24µs making 1 call to Foswiki::If::OP_isweb::BEGIN@12 # spent 7µs making 1 call to warnings::import
13
142187µs15µs
# spent 5µs within Foswiki::If::OP_isweb::BEGIN@14 which was called: # once (5µs+0s) by Foswiki::If::Parser::new at line 14
use Foswiki::Query::UnaryOP ();
# spent 5µs making 1 call to Foswiki::If::OP_isweb::BEGIN@14
1519µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 47µs (24+24) within Foswiki::If::OP_isweb::new which was called: # once (24µs+24µs) by Foswiki::If::Parser::new at line 31 of /var/www/foswiki11/lib/Foswiki/If/Parser.pm
sub new {
181700ns my $class = shift;
19122µs124µs return $class->SUPER::new(
# spent 24µs making 1 call to Foswiki::Query::UnaryOP::new
20 name => 'isweb',
21 prec => 600
22 );
23}
24
25sub evaluate {
26 my $this = shift;
27 my $node = shift;
28 my $a = $node->{params}->[0];
29 my %domain = @_;
30 my $session = $domain{tom}->session;
31 throw Error::Simple(
32 'No context in which to evaluate "' . $a->stringify() . '"' )
33 unless $session;
34 my $web = $a->_evaluate(@_) || '';
35 return $session->webExists($web) ? 1 : 0;
36}
37
3814µs1;
39__END__