Filename | /usr/lib/perl5/DateTime/Infinite.pm |
Statements | Executed 44 statements in 1.07ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 29µs | 49µs | BEGIN@15 | DateTime::Infinite::
1 | 1 | 1 | 18µs | 109µs | BEGIN@12 | DateTime::Infinite::
1 | 1 | 1 | 15µs | 15µs | BEGIN@2 | DateTime::Infinite::
1 | 1 | 1 | 15µs | 94µs | BEGIN@46 | DateTime::Infinite::Future::
1 | 1 | 1 | 14µs | 21µs | BEGIN@6 | DateTime::Infinite::
1 | 1 | 1 | 13µs | 18µs | BEGIN@9 | DateTime::Infinite::
1 | 1 | 1 | 12µs | 14µs | BEGIN@10 | DateTime::Infinite::
1 | 1 | 1 | 12µs | 38µs | BEGIN@7 | DateTime::Infinite::
1 | 1 | 1 | 12µs | 63µs | BEGIN@70 | DateTime::Infinite::Past::
1 | 1 | 1 | 10µs | 10µs | BEGIN@42 | DateTime::Infinite::Future::
2 | 1 | 1 | 8µs | 8µs | _rd2ymd | DateTime::Infinite::
1 | 1 | 1 | 8µs | 8µs | BEGIN@66 | DateTime::Infinite::Past::
2 | 1 | 1 | 4µs | 4µs | _seconds_as_components | DateTime::Infinite::
0 | 0 | 0 | 0s | 0s | new | DateTime::Infinite::Future::
0 | 0 | 0 | 0s | 0s | new | DateTime::Infinite::Past::
0 | 0 | 0 | 0s | 0s | STORABLE_freeze | DateTime::Infinite::
0 | 0 | 0 | 0s | 0s | STORABLE_thaw | DateTime::Infinite::
0 | 0 | 0 | 0s | 0s | __ANON__[:16] | DateTime::Infinite::
0 | 0 | 0 | 0s | 0s | _stringify | DateTime::Infinite::
0 | 0 | 0 | 0s | 0s | is_finite | DateTime::Infinite::
0 | 0 | 0 | 0s | 0s | is_infinite | DateTime::Infinite::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package DateTime::Infinite; | ||||
2 | # spent 15µs within DateTime::Infinite::BEGIN@2 which was called:
# once (15µs+0s) by C4::Circulation::BEGIN@24 at line 4 | ||||
3 | 1 | 9µs | $DateTime::Infinite::VERSION = '0.61'; | ||
4 | 1 | 25µs | 1 | 15µs | } # spent 15µs making 1 call to DateTime::Infinite::BEGIN@2 |
5 | |||||
6 | 3 | 30µs | 2 | 28µs | # spent 21µs (14+7) within DateTime::Infinite::BEGIN@6 which was called:
# once (14µs+7µs) by C4::Circulation::BEGIN@24 at line 6 # spent 21µs making 1 call to DateTime::Infinite::BEGIN@6
# spent 7µs making 1 call to strict::import |
7 | 3 | 30µs | 2 | 65µs | # spent 38µs (12+27) within DateTime::Infinite::BEGIN@7 which was called:
# once (12µs+27µs) by C4::Circulation::BEGIN@24 at line 7 # spent 38µs making 1 call to DateTime::Infinite::BEGIN@7
# spent 27µs making 1 call to warnings::import |
8 | |||||
9 | 3 | 28µs | 2 | 23µs | # spent 18µs (13+5) within DateTime::Infinite::BEGIN@9 which was called:
# once (13µs+5µs) by C4::Circulation::BEGIN@24 at line 9 # spent 18µs making 1 call to DateTime::Infinite::BEGIN@9
# spent 5µs making 1 call to UNIVERSAL::import |
10 | 3 | 31µs | 2 | 15µs | # spent 14µs (12+1) within DateTime::Infinite::BEGIN@10 which was called:
# once (12µs+1µs) by C4::Circulation::BEGIN@24 at line 10 # spent 14µs making 1 call to DateTime::Infinite::BEGIN@10
# spent 1µs making 1 call to UNIVERSAL::import |
11 | |||||
12 | 3 | 52µs | 2 | 200µs | # spent 109µs (18+91) within DateTime::Infinite::BEGIN@12 which was called:
# once (18µs+91µs) by C4::Circulation::BEGIN@24 at line 12 # spent 109µs making 1 call to DateTime::Infinite::BEGIN@12
# spent 91µs making 1 call to base::import |
13 | |||||
14 | 1 | 2µs | foreach my $m (qw( set set_time_zone truncate )) { | ||
15 | 3 | 214µs | 2 | 69µs | # spent 49µs (29+20) within DateTime::Infinite::BEGIN@15 which was called:
# once (29µs+20µs) by C4::Circulation::BEGIN@24 at line 15 # spent 49µs making 1 call to DateTime::Infinite::BEGIN@15
# spent 20µs making 1 call to strict::unimport |
16 | 3 | 22µs | *{"DateTime::Infinite::$m"} = sub { return $_[0] }; | ||
17 | } | ||||
18 | |||||
19 | sub is_finite {0} | ||||
20 | sub is_infinite {1} | ||||
21 | |||||
22 | # spent 8µs within DateTime::Infinite::_rd2ymd which was called 2 times, avg 4µs/call:
# 2 times (8µs+0s) by DateTime::_calc_local_components at line 408 of DateTime.pm, avg 4µs/call | ||||
23 | 2 | 11µs | return $_[2] ? ( $_[1] ) x 7 : ( $_[1] ) x 3; | ||
24 | } | ||||
25 | |||||
26 | # spent 4µs within DateTime::Infinite::_seconds_as_components which was called 2 times, avg 2µs/call:
# 2 times (4µs+0s) by DateTime::_calc_local_components at line 413 of DateTime.pm, avg 2µs/call | ||||
27 | 2 | 8µs | return ( $_[1] ) x 3; | ||
28 | } | ||||
29 | |||||
30 | sub _stringify { | ||||
31 | ( | ||||
32 | $_[0]->{utc_rd_days} == DateTime::INFINITY | ||||
33 | ? DateTime::INFINITY . '' | ||||
34 | : DateTime::NEG_INFINITY . '' | ||||
35 | ); | ||||
36 | } | ||||
37 | |||||
38 | sub STORABLE_freeze {return} | ||||
39 | sub STORABLE_thaw {return} | ||||
40 | |||||
41 | package DateTime::Infinite::Future; | ||||
42 | # spent 10µs within DateTime::Infinite::Future::BEGIN@42 which was called:
# once (10µs+0s) by C4::Circulation::BEGIN@24 at line 44 | ||||
43 | 1 | 11µs | $DateTime::Infinite::Future::VERSION = '0.61'; | ||
44 | 1 | 50µs | 1 | 10µs | } # spent 10µs making 1 call to DateTime::Infinite::Future::BEGIN@42 |
45 | |||||
46 | 3 | 154µs | 2 | 174µs | # spent 94µs (15+80) within DateTime::Infinite::Future::BEGIN@46 which was called:
# once (15µs+80µs) by C4::Circulation::BEGIN@24 at line 46 # spent 94µs making 1 call to DateTime::Infinite::Future::BEGIN@46
# spent 80µs making 1 call to base::import |
47 | |||||
48 | { | ||||
49 | 4 | 117µs | 1 | 133µs | my $Pos = bless { # spent 133µs making 1 call to DateTime::TimeZone::new |
50 | utc_rd_days => DateTime::INFINITY, | ||||
51 | utc_rd_secs => DateTime::INFINITY, | ||||
52 | local_rd_days => DateTime::INFINITY, | ||||
53 | local_rd_secs => DateTime::INFINITY, | ||||
54 | rd_nanosecs => DateTime::INFINITY, | ||||
55 | tz => DateTime::TimeZone->new( name => 'floating' ), | ||||
56 | }, | ||||
57 | __PACKAGE__; | ||||
58 | |||||
59 | 1 | 58µs | $Pos->_calc_utc_rd; # spent 58µs making 1 call to DateTime::_calc_utc_rd | ||
60 | 1 | 62µs | $Pos->_calc_local_rd; # spent 62µs making 1 call to DateTime::_calc_local_rd | ||
61 | |||||
62 | sub new {$Pos} | ||||
63 | } | ||||
64 | |||||
65 | package DateTime::Infinite::Past; | ||||
66 | # spent 8µs within DateTime::Infinite::Past::BEGIN@66 which was called:
# once (8µs+0s) by C4::Circulation::BEGIN@24 at line 68 | ||||
67 | 1 | 7µs | $DateTime::Infinite::Past::VERSION = '0.61'; | ||
68 | 1 | 28µs | 1 | 8µs | } # spent 8µs making 1 call to DateTime::Infinite::Past::BEGIN@66 |
69 | |||||
70 | 3 | 114µs | 2 | 114µs | # spent 63µs (12+51) within DateTime::Infinite::Past::BEGIN@70 which was called:
# once (12µs+51µs) by C4::Circulation::BEGIN@24 at line 70 # spent 63µs making 1 call to DateTime::Infinite::Past::BEGIN@70
# spent 51µs making 1 call to base::import |
71 | |||||
72 | { | ||||
73 | 4 | 109µs | 1 | 87µs | my $Neg = bless { # spent 87µs making 1 call to DateTime::TimeZone::new |
74 | utc_rd_days => DateTime::NEG_INFINITY, | ||||
75 | utc_rd_secs => DateTime::NEG_INFINITY, | ||||
76 | local_rd_days => DateTime::NEG_INFINITY, | ||||
77 | local_rd_secs => DateTime::NEG_INFINITY, | ||||
78 | rd_nanosecs => DateTime::NEG_INFINITY, | ||||
79 | tz => DateTime::TimeZone->new( name => 'floating' ), | ||||
80 | }, | ||||
81 | __PACKAGE__; | ||||
82 | |||||
83 | 1 | 23µs | $Neg->_calc_utc_rd; # spent 23µs making 1 call to DateTime::_calc_utc_rd | ||
84 | 1 | 50µs | $Neg->_calc_local_rd; # spent 50µs making 1 call to DateTime::_calc_local_rd | ||
85 | |||||
86 | sub new {$Neg} | ||||
87 | } | ||||
88 | |||||
89 | 1 | 16µs | 1; | ||
90 | |||||
91 | # ABSTRACT: Infinite past and future DateTime objects | ||||
92 | |||||
- - | |||||
95 | =pod | ||||
96 | |||||
- - | |||||
164 | __END__ |