← 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:35 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/OP_int.pm
StatementsExecuted 14 statements in 423µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
31161µs141µsFoswiki::Query::OP_int::::newFoswiki::Query::OP_int::new
11130µs38µsFoswiki::Query::OP_int::::BEGIN@11Foswiki::Query::OP_int::BEGIN@11
11116µs34µsFoswiki::Query::OP_int::::BEGIN@12Foswiki::Query::OP_int::BEGIN@12
1119µs9µ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
11245µs246µs
# spent 38µs (30+8) within Foswiki::Query::OP_int::BEGIN@11 which was called: # once (30µs+8µs) by Foswiki::Query::Parser::BEGIN@61 at line 11
use strict;
# spent 38µs making 1 call to Foswiki::Query::OP_int::BEGIN@11 # spent 8µs making 1 call to strict::import
12244µs252µs
# spent 34µs (16+18) within Foswiki::Query::OP_int::BEGIN@12 which was called: # once (16µs+18µs) by Foswiki::Query::Parser::BEGIN@61 at line 12
use warnings;
# spent 34µs making 1 call to Foswiki::Query::OP_int::BEGIN@12 # spent 18µs making 1 call to warnings::import
13
142265µs19µs
# spent 9µs within Foswiki::Query::OP_int::BEGIN@14 which was called: # once (9µs+0s) by Foswiki::Query::Parser::BEGIN@61 at line 14
use Foswiki::Query::UnaryOP ();
# spent 9µs making 1 call to Foswiki::Query::OP_int::BEGIN@14
1519µsour @ISA = ('Foswiki::Query::UnaryOP');
16
17
# spent 141µs (61+80) within Foswiki::Query::OP_int::new which was called 3 times, avg 47µs/call: # 3 times (61µs+80µs) by Foswiki::Query::Parser::new at line 105 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Parser.pm, avg 47µs/call
sub new {
18655µs my $class = shift;
19380µs return $class->SUPER::new( name => 'int', prec => 1000 );
# spent 80µs making 3 calls to Foswiki::Query::UnaryOP::new, avg 27µ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
4516µs1;
46__END__