Filename | /var/www/foswiki11/lib/Foswiki/Query/OP_and.pm |
Statements | Executed 54 statements in 12.5ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
6 | 1 | 1 | 56µs | 2.58ms | evaluate | Foswiki::Query::OP_and::
3 | 1 | 1 | 53µs | 106µs | new | Foswiki::Query::OP_and::
1 | 1 | 1 | 26µs | 36µs | BEGIN@12 | Foswiki::Query::OP_and::
1 | 1 | 1 | 22µs | 48µs | BEGIN@11 | Foswiki::Query::OP_and::
1 | 1 | 1 | 16µs | 33µs | BEGIN@26 | Foswiki::Query::OP_and::
1 | 1 | 1 | 16µs | 34µs | BEGIN@36 | Foswiki::Query::OP_and::
1 | 1 | 1 | 14µs | 34µs | BEGIN@30 | Foswiki::Query::OP_and::
1 | 1 | 1 | 14µs | 33µs | BEGIN@42 | Foswiki::Query::OP_and::
1 | 1 | 1 | 6µs | 6µs | BEGIN@14 | Foswiki::Query::OP_and::
0 | 0 | 0 | 0s | 0s | evaluatesToConstant | Foswiki::Query::OP_and::
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_and | ||||
6 | |||||
7 | =cut | ||||
8 | |||||
9 | package Foswiki::Query::OP_and; | ||||
10 | |||||
11 | 2 | 11.8ms | 2 | 73µs | # spent 48µs (22+25) within Foswiki::Query::OP_and::BEGIN@11 which was called:
# once (22µs+25µs) by Foswiki::Query::Parser::new at line 11 # spent 48µs making 1 call to Foswiki::Query::OP_and::BEGIN@11
# spent 25µs making 1 call to strict::import |
12 | 2 | 50µs | 2 | 45µs | # spent 36µs (26+9) within Foswiki::Query::OP_and::BEGIN@12 which was called:
# once (26µs+9µs) by Foswiki::Query::Parser::new at line 12 # spent 36µs making 1 call to Foswiki::Query::OP_and::BEGIN@12
# spent 10µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 146µs | 1 | 6µs | # spent 6µs within Foswiki::Query::OP_and::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_and::BEGIN@14 |
15 | 1 | 12µs | our @ISA = ('Foswiki::Query::BinaryOP'); | ||
16 | |||||
17 | # spent 106µs (53+52) within Foswiki::Query::OP_and::new which was called 3 times, avg 35µs/call:
# 3 times (53µs+52µs) by Foswiki::Query::Parser::new at line 47 of /var/www/foswiki11/lib/Foswiki/Query/Parser.pm, avg 35µs/call | ||||
18 | 3 | 2µs | my $class = shift; | ||
19 | 3 | 45µs | 3 | 52µs | return $class->SUPER::new( name => 'and', prec => 200 ); # spent 52µs making 3 calls to Foswiki::Query::BinaryOP::new, avg 18µs/call |
20 | } | ||||
21 | |||||
22 | # spent 2.58ms (56µs+2.52) within Foswiki::Query::OP_and::evaluate which was called 6 times, avg 429µs/call:
# 6 times (56µs+2.52ms) by Foswiki::Query::Node::evaluate at line 184 of /var/www/foswiki11/lib/Foswiki/Query/Node.pm, avg 429µs/call | ||||
23 | 6 | 2µs | my $this = shift; | ||
24 | 6 | 1µs | my $node = shift; | ||
25 | 6 | 3µs | my $a = $node->{params}[0]; | ||
26 | 2 | 96µs | 2 | 49µs | # spent 33µs (16+16) within Foswiki::Query::OP_and::BEGIN@26 which was called:
# once (16µs+16µs) by Foswiki::Query::Parser::new at line 26 # spent 33µs making 1 call to Foswiki::Query::OP_and::BEGIN@26
# spent 16µs making 1 call to warnings::unimport |
27 | 6 | 13µs | 6 | 0s | return 0 unless $a->evaluate(@_); # spent 1.52ms making 6 calls to Foswiki::Query::Node::evaluate, avg 253µs/call, recursion: max depth 1, sum of overlapping time 1.52ms |
28 | 4 | 3µs | my $b = $node->{params}[1]; | ||
29 | 4 | 19µs | 4 | 0s | return $b->evaluate(@_) ? 1 : 0; # spent 1.01ms making 4 calls to Foswiki::Query::Node::evaluate, avg 251µs/call, recursion: max depth 1, sum of overlapping time 1.01ms |
30 | 2 | 90µs | 2 | 54µs | # spent 34µs (14+20) within Foswiki::Query::OP_and::BEGIN@30 which was called:
# once (14µs+20µs) by Foswiki::Query::Parser::new at line 30 # spent 34µs making 1 call to Foswiki::Query::OP_and::BEGIN@30
# spent 20µs making 1 call to warnings::import |
31 | } | ||||
32 | |||||
33 | sub evaluatesToConstant { | ||||
34 | my $this = shift; | ||||
35 | my $node = shift; | ||||
36 | 2 | 130µs | 2 | 53µs | # spent 34µs (16+19) within Foswiki::Query::OP_and::BEGIN@36 which was called:
# once (16µs+19µs) by Foswiki::Query::Parser::new at line 36 # spent 34µs making 1 call to Foswiki::Query::OP_and::BEGIN@36
# spent 19µ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 | 78µs | 2 | 53µs | # spent 33µs (14+19) within Foswiki::Query::OP_and::BEGIN@42 which was called:
# once (14µs+19µs) by Foswiki::Query::Parser::new at line 42 # spent 33µs making 1 call to Foswiki::Query::OP_and::BEGIN@42
# spent 19µs making 1 call to warnings::import |
43 | return 0; | ||||
44 | } | ||||
45 | |||||
46 | 1 | 5µs | 1; | ||
47 | __END__ |