Filename | /usr/lib/perl5/DateTime/Infinite.pm |
Statements | Executed 44 statements in 1.03ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 18µs | 94µs | BEGIN@12 | DateTime::Infinite::
1 | 1 | 1 | 14µs | 14µs | BEGIN@2 | DateTime::Infinite::
1 | 1 | 1 | 14µs | 20µs | BEGIN@6 | DateTime::Infinite::
1 | 1 | 1 | 11µs | 33µs | BEGIN@7 | DateTime::Infinite::
1 | 1 | 1 | 10µs | 29µs | BEGIN@15 | DateTime::Infinite::
1 | 1 | 1 | 9µs | 61µs | BEGIN@70 | DateTime::Infinite::Past::
1 | 1 | 1 | 9µs | 63µs | BEGIN@46 | DateTime::Infinite::Future::
1 | 1 | 1 | 8µs | 8µs | BEGIN@10 | DateTime::Infinite::
2 | 1 | 1 | 7µs | 7µs | _rd2ymd | DateTime::Infinite::
1 | 1 | 1 | 7µs | 7µs | BEGIN@42 | DateTime::Infinite::Future::
1 | 1 | 1 | 6µs | 6µs | BEGIN@66 | DateTime::Infinite::Past::
1 | 1 | 1 | 6µs | 6µs | BEGIN@9 | DateTime::Infinite::
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 14µs within DateTime::Infinite::BEGIN@2 which was called:
# once (14µs+0s) by C4::Circulation::BEGIN@24 at line 4 | ||||
3 | 1 | 8µs | $DateTime::Infinite::VERSION = '0.61'; | ||
4 | 1 | 23µs | 1 | 14µs | } # spent 14µs making 1 call to DateTime::Infinite::BEGIN@2 |
5 | |||||
6 | 3 | 28µs | 2 | 25µs | # spent 20µs (14+6) within DateTime::Infinite::BEGIN@6 which was called:
# once (14µs+6µs) by C4::Circulation::BEGIN@24 at line 6 # spent 20µs making 1 call to DateTime::Infinite::BEGIN@6
# spent 6µs making 1 call to strict::import |
7 | 3 | 28µs | 2 | 54µs | # spent 33µs (11+22) within DateTime::Infinite::BEGIN@7 which was called:
# once (11µs+22µs) by C4::Circulation::BEGIN@24 at line 7 # spent 33µs making 1 call to DateTime::Infinite::BEGIN@7
# spent 22µs making 1 call to warnings::import |
8 | |||||
9 | 3 | 24µs | 1 | 6µs | # spent 6µs within DateTime::Infinite::BEGIN@9 which was called:
# once (6µs+0s) by C4::Circulation::BEGIN@24 at line 9 # spent 6µs making 1 call to DateTime::Infinite::BEGIN@9 |
10 | 3 | 28µs | 1 | 8µs | # spent 8µs within DateTime::Infinite::BEGIN@10 which was called:
# once (8µs+0s) by C4::Circulation::BEGIN@24 at line 10 # spent 8µs making 1 call to DateTime::Infinite::BEGIN@10 |
11 | |||||
12 | 3 | 48µs | 2 | 170µs | # spent 94µs (18+76) within DateTime::Infinite::BEGIN@12 which was called:
# once (18µs+76µs) by C4::Circulation::BEGIN@24 at line 12 # spent 94µs making 1 call to DateTime::Infinite::BEGIN@12
# spent 76µs making 1 call to base::import |
13 | |||||
14 | 1 | 2µs | foreach my $m (qw( set set_time_zone truncate )) { | ||
15 | 3 | 252µs | 2 | 49µs | # spent 29µs (10+19) within DateTime::Infinite::BEGIN@15 which was called:
# once (10µs+19µs) by C4::Circulation::BEGIN@24 at line 15 # spent 29µs making 1 call to DateTime::Infinite::BEGIN@15
# spent 19µs making 1 call to strict::unimport |
16 | 3 | 24µs | *{"DateTime::Infinite::$m"} = sub { return $_[0] }; | ||
17 | } | ||||
18 | |||||
19 | sub is_finite {0} | ||||
20 | sub is_infinite {1} | ||||
21 | |||||
22 | # spent 7µs within DateTime::Infinite::_rd2ymd which was called 2 times, avg 4µs/call:
# 2 times (7µs+0s) by DateTime::_calc_local_components at line 408 of DateTime.pm, avg 4µs/call | ||||
23 | 2 | 18µ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 | 7µ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 7µs within DateTime::Infinite::Future::BEGIN@42 which was called:
# once (7µs+0s) by C4::Circulation::BEGIN@24 at line 44 | ||||
43 | 1 | 7µs | $DateTime::Infinite::Future::VERSION = '0.61'; | ||
44 | 1 | 23µs | 1 | 7µs | } # spent 7µs making 1 call to DateTime::Infinite::Future::BEGIN@42 |
45 | |||||
46 | 3 | 108µs | 2 | 118µs | # spent 63µs (9+54) within DateTime::Infinite::Future::BEGIN@46 which was called:
# once (9µs+54µs) by C4::Circulation::BEGIN@24 at line 46 # spent 63µs making 1 call to DateTime::Infinite::Future::BEGIN@46
# spent 54µs making 1 call to base::import |
47 | |||||
48 | { | ||||
49 | 4 | 141µs | 1 | 169µs | my $Pos = bless { # spent 169µ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 | 66µs | $Pos->_calc_utc_rd; # spent 66µs making 1 call to DateTime::_calc_utc_rd | ||
60 | 1 | 91µs | $Pos->_calc_local_rd; # spent 91µs making 1 call to DateTime::_calc_local_rd | ||
61 | |||||
62 | sub new {$Pos} | ||||
63 | } | ||||
64 | |||||
65 | package DateTime::Infinite::Past; | ||||
66 | # spent 6µs within DateTime::Infinite::Past::BEGIN@66 which was called:
# once (6µs+0s) by C4::Circulation::BEGIN@24 at line 68 | ||||
67 | 1 | 6µs | $DateTime::Infinite::Past::VERSION = '0.61'; | ||
68 | 1 | 27µs | 1 | 6µs | } # spent 6µs making 1 call to DateTime::Infinite::Past::BEGIN@66 |
69 | |||||
70 | 3 | 113µs | 2 | 114µs | # spent 61µs (9+52) within DateTime::Infinite::Past::BEGIN@70 which was called:
# once (9µs+52µs) by C4::Circulation::BEGIN@24 at line 70 # spent 61µs making 1 call to DateTime::Infinite::Past::BEGIN@70
# spent 52µs making 1 call to base::import |
71 | |||||
72 | { | ||||
73 | 4 | 97µs | 1 | 70µs | my $Neg = bless { # spent 70µ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 | 42µs | $Neg->_calc_utc_rd; # spent 42µs making 1 call to DateTime::_calc_utc_rd | ||
84 | 1 | 44µs | $Neg->_calc_local_rd; # spent 44µs making 1 call to DateTime::_calc_local_rd | ||
85 | |||||
86 | sub new {$Neg} | ||||
87 | } | ||||
88 | |||||
89 | 1 | 15µs | 1; | ||
90 | |||||
91 | # ABSTRACT: Infinite past and future DateTime objects | ||||
92 | |||||
- - | |||||
95 | =pod | ||||
96 | |||||
- - | |||||
164 | __END__ |