Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/OP_d2n.pm |
Statements | Executed 14 statements in 481µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
3 | 1 | 1 | 65µs | 159µs | new | Foswiki::Query::OP_d2n::
1 | 1 | 1 | 59µs | 73µs | BEGIN@11 | Foswiki::Query::OP_d2n::
1 | 1 | 1 | 18µs | 42µs | BEGIN@12 | Foswiki::Query::OP_d2n::
1 | 1 | 1 | 11µs | 11µs | BEGIN@14 | Foswiki::Query::OP_d2n::
0 | 0 | 0 | 0s | 0s | __ANON__[:39] | Foswiki::Query::OP_d2n::
0 | 0 | 0 | 0s | 0s | evaluate | Foswiki::Query::OP_d2n::
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_d2n | ||||
6 | |||||
7 | =cut | ||||
8 | |||||
9 | package Foswiki::Query::OP_d2n; | ||||
10 | |||||
11 | 2 | 75µs | 2 | 87µs | # spent 73µs (59+14) within Foswiki::Query::OP_d2n::BEGIN@11 which was called:
# once (59µs+14µs) by Foswiki::Query::Parser::BEGIN@58 at line 11 # spent 73µs making 1 call to Foswiki::Query::OP_d2n::BEGIN@11
# spent 14µs making 1 call to strict::import |
12 | 2 | 74µs | 2 | 65µs | # spent 42µs (18+24) within Foswiki::Query::OP_d2n::BEGIN@12 which was called:
# once (18µs+24µs) by Foswiki::Query::Parser::BEGIN@58 at line 12 # spent 42µs making 1 call to Foswiki::Query::OP_d2n::BEGIN@12
# spent 24µs making 1 call to warnings::import |
13 | |||||
14 | 2 | 249µs | 1 | 11µs | # spent 11µs within Foswiki::Query::OP_d2n::BEGIN@14 which was called:
# once (11µs+0s) by Foswiki::Query::Parser::BEGIN@58 at line 14 # spent 11µs making 1 call to Foswiki::Query::OP_d2n::BEGIN@14 |
15 | 1 | 18µs | our @ISA = ('Foswiki::Query::UnaryOP'); | ||
16 | |||||
17 | # spent 159µs (65+94) within Foswiki::Query::OP_d2n::new which was called 3 times, avg 53µs/call:
# 3 times (65µs+94µs) by Foswiki::Query::Parser::new at line 105 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Query/Parser.pm, avg 53µs/call | ||||
18 | 3 | 6µs | my $class = shift; | ||
19 | 3 | 54µs | 3 | 94µs | return $class->SUPER::new( name => 'd2n', prec => 1000 ); # spent 94µs making 3 calls to Foswiki::Query::UnaryOP::new, avg 31µs/call |
20 | } | ||||
21 | |||||
22 | sub evaluate { | ||||
23 | my $this = shift; | ||||
24 | my $node = shift; | ||||
25 | return $this->evalUnary( | ||||
26 | $node, | ||||
27 | sub { | ||||
28 | my $date = shift; | ||||
29 | |||||
30 | if ( defined $date ) { | ||||
31 | eval { | ||||
32 | require Foswiki::Time; | ||||
33 | $date = Foswiki::Time::parseTime( $date, 1 ); | ||||
34 | }; | ||||
35 | } | ||||
36 | |||||
37 | # ignore $@ | ||||
38 | return $date; | ||||
39 | }, | ||||
40 | @_ | ||||
41 | ); | ||||
42 | } | ||||
43 | |||||
44 | 1 | 7µs | 1; | ||
45 | __END__ |