Filename | /var/www/foswiki11/lib/Foswiki/Query/OP_or.pm |
Statements | Executed 32 statements in 623µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
3 | 1 | 1 | 50µs | 96µs | new | Foswiki::Query::OP_or::
2 | 1 | 1 | 21µs | 723µs | evaluate (recurses: max depth 1, inclusive time 683µs) | Foswiki::Query::OP_or::
1 | 1 | 1 | 20µs | 38µs | BEGIN@11 | Foswiki::Query::OP_or::
1 | 1 | 1 | 14µs | 25µs | BEGIN@36 | Foswiki::Query::OP_or::
1 | 1 | 1 | 14µs | 27µs | BEGIN@26 | Foswiki::Query::OP_or::
1 | 1 | 1 | 13µs | 20µs | BEGIN@12 | Foswiki::Query::OP_or::
1 | 1 | 1 | 13µs | 28µs | BEGIN@30 | Foswiki::Query::OP_or::
1 | 1 | 1 | 12µs | 26µs | BEGIN@42 | Foswiki::Query::OP_or::
1 | 1 | 1 | 6µs | 6µs | BEGIN@14 | Foswiki::Query::OP_or::
0 | 0 | 0 | 0s | 0s | evaluatesToConstant | Foswiki::Query::OP_or::
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_or | ||||
6 | |||||
7 | =cut | ||||
8 | |||||
9 | package Foswiki::Query::OP_or; | ||||
10 | |||||
11 | 2 | 38µs | 2 | 57µs | # spent 38µs (20+19) within Foswiki::Query::OP_or::BEGIN@11 which was called:
# once (20µs+19µs) by Foswiki::Query::Parser::new at line 11 # spent 38µs making 1 call to Foswiki::Query::OP_or::BEGIN@11
# spent 19µs making 1 call to strict::import |
12 | 2 | 42µs | 2 | 28µs | # spent 20µs (13+7) within Foswiki::Query::OP_or::BEGIN@12 which was called:
# once (13µs+7µs) by Foswiki::Query::Parser::new at line 12 # spent 20µs making 1 call to Foswiki::Query::OP_or::BEGIN@12
# spent 7µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 140µs | 1 | 6µs | # spent 6µs within Foswiki::Query::OP_or::BEGIN@14 which was called:
# once (6µs+0s) by Foswiki::Query::Parser::new at line 14 # spent 6µs making 1 call to Foswiki::Query::OP_or::BEGIN@14 |
15 | 1 | 9µs | our @ISA = ('Foswiki::Query::BinaryOP'); | ||
16 | |||||
17 | # spent 96µs (50+47) within Foswiki::Query::OP_or::new which was called 3 times, avg 32µs/call:
# 3 times (50µs+47µs) by Foswiki::Query::Parser::new at line 47 of /var/www/foswiki11/lib/Foswiki/Query/Parser.pm, avg 32µs/call | ||||
18 | 3 | 2µs | my $class = shift; | ||
19 | 3 | 44µs | 3 | 47µs | return $class->SUPER::new( name => 'or', prec => 100 ); # spent 47µs making 3 calls to Foswiki::Query::BinaryOP::new, avg 16µs/call |
20 | } | ||||
21 | |||||
22 | # spent 723µs (21+702) within Foswiki::Query::OP_or::evaluate which was called 2 times, avg 362µs/call:
# 2 times (21µs+702µs) by Foswiki::Query::Node::evaluate at line 184 of /var/www/foswiki11/lib/Foswiki/Query/Node.pm, avg 362µs/call | ||||
23 | 2 | 600ns | my $this = shift; | ||
24 | 2 | 400ns | my $node = shift; | ||
25 | 2 | 900ns | my $a = $node->{params}[0]; | ||
26 | 2 | 77µs | 2 | 41µs | # spent 27µs (14+14) within Foswiki::Query::OP_or::BEGIN@26 which was called:
# once (14µs+14µs) by Foswiki::Query::Parser::new at line 26 # spent 27µs making 1 call to Foswiki::Query::OP_or::BEGIN@26
# spent 14µs making 1 call to warnings::unimport |
27 | 2 | 15µs | 2 | 0s | return 1 if $a->evaluate(@_); # spent 964µs making 2 calls to Foswiki::Query::Node::evaluate, avg 482µs/call, recursion: max depth 2, sum of overlapping time 964µs |
28 | 1 | 800ns | my $b = $node->{params}[1]; | ||
29 | 1 | 7µs | 1 | 0s | return $b->evaluate(@_) ? 1 : 0; # spent 421µs making 1 call to Foswiki::Query::Node::evaluate, recursion: max depth 2, sum of overlapping time 421µs |
30 | 2 | 73µs | 2 | 44µs | # spent 28µs (13+16) within Foswiki::Query::OP_or::BEGIN@30 which was called:
# once (13µs+16µs) by Foswiki::Query::Parser::new at line 30 # spent 28µs making 1 call to Foswiki::Query::OP_or::BEGIN@30
# spent 16µs making 1 call to warnings::import |
31 | } | ||||
32 | |||||
33 | sub evaluatesToConstant { | ||||
34 | my $this = shift; | ||||
35 | my $node = shift; | ||||
36 | 2 | 108µs | 2 | 37µs | # spent 25µs (14+12) within Foswiki::Query::OP_or::BEGIN@36 which was called:
# once (14µs+12µs) by Foswiki::Query::Parser::new at line 36 # spent 25µs making 1 call to Foswiki::Query::OP_or::BEGIN@36
# spent 12µs making 1 call to warnings::unimport |
37 | my $ac = $node->{params}[0]->evaluatesToConstant(@_); | ||||
38 | my $bc = $node->{params}[1]->evaluatesToConstant(@_); | ||||
39 | return 1 if ( $ac && $bc ); | ||||
40 | return 1 if $ac && $node->{params}[0]->evaluate(@_); | ||||
41 | return 1 if $bc && $node->{params}[1]->evaluate(@_); | ||||
42 | 2 | 62µs | 2 | 41µs | # spent 26µs (12+15) within Foswiki::Query::OP_or::BEGIN@42 which was called:
# once (12µs+15µs) by Foswiki::Query::Parser::new at line 42 # spent 26µs making 1 call to Foswiki::Query::OP_or::BEGIN@42
# spent 15µs making 1 call to warnings::import |
43 | return 0; | ||||
44 | } | ||||
45 | |||||
46 | 1 | 4µs | 1; | ||
47 | __END__ |