← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:15 2015

Filename/var/www/foswikidev/core/lib/Foswiki/Query/OP_int.pm
StatementsExecuted 14 statements in 263µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
31135µs81µsFoswiki::Query::OP_int::::newFoswiki::Query::OP_int::new
11113µs26µsFoswiki::Query::OP_int::::BEGIN@11Foswiki::Query::OP_int::BEGIN@11
1119µs13µsFoswiki::Query::OP_int::::BEGIN@12Foswiki::Query::OP_int::BEGIN@12
1117µs7µsFoswiki::Query::OP_int::::BEGIN@14Foswiki::Query::OP_int::BEGIN@14
0000s0sFoswiki::Query::OP_int::::__ANON__[:35]Foswiki::Query::OP_int::__ANON__[:35]
0000s0sFoswiki::Query::OP_int::::evaluateFoswiki::Query::OP_int::evaluate
0000s0sFoswiki::Query::OP_int::::evaluatesToConstantFoswiki::Query::OP_int::evaluatesToConstant
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::Query::OP_int
6
7=cut
8
9package Foswiki::Query::OP_int;
10
11226µs240µs
# spent 26µs (13+13) within Foswiki::Query::OP_int::BEGIN@11 which was called: # once (13µs+13µs) by Foswiki::Query::Parser::BEGIN@68 at line 11
use strict;
# spent 26µs making 1 call to Foswiki::Query::OP_int::BEGIN@11 # spent 13µs making 1 call to strict::import
12233µs217µs
# spent 13µs (9+4) within Foswiki::Query::OP_int::BEGIN@12 which was called: # once (9µs+4µs) by Foswiki::Query::Parser::BEGIN@68 at line 12
use warnings;
# spent 13µs making 1 call to Foswiki::Query::OP_int::BEGIN@12 # spent 4µs making 1 call to warnings::import
13
142162µs17µs
# spent 7µs within Foswiki::Query::OP_int::BEGIN@14 which was called: # once (7µs+0s) by Foswiki::Query::Parser::BEGIN@68 at line 14
use Foswiki::Query::UnaryOP ();
# spent 7µs making 1 call to Foswiki::Query::OP_int::BEGIN@14
1517µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 81µs (35+46) within Foswiki::Query::OP_int::new which was called 3 times, avg 27µs/call: # 3 times (35µs+46µs) by Foswiki::Query::Parser::new at line 112 of /var/www/foswikidev/core/lib/Foswiki/Query/Parser.pm, avg 27µs/call
sub new {
1831µs my $class = shift;
19332µs346µs return $class->SUPER::new( name => 'int', prec => 1000 );
# spent 46µs making 3 calls to Foswiki::Query::UnaryOP::new, avg 15µs/call
20}
21
22sub evaluate {
23 my $this = shift;
24 my $node = shift;
25
26 my $a = $node->{params}[0]->evaluate(@_);
27 return $this->collect(
28 $a,
29 sub {
30 defined $_[0]
31 ? Foswiki::Query::OP::isNumber( $_[0] )
32 ? int( $_[0] )
33 : 0
34 : undef;
35 }
36 );
37}
38
39sub evaluatesToConstant {
40 my $this = shift;
41 my $node = shift;
42 return $node->{params}[0]->evaluatesToConstant(@_);
43}
44
4513µs1;
46__END__