← Index
NYTProf Performance Profile   « block view • line view • sub view »
For xt/tapper-mcp-scheduler-with-db-longrun.t
  Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:23:59 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/DateTime/Infinite.pm
StatementsExecuted 47 statements in 722µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11121µs27µsDateTime::Infinite::::BEGIN@6 DateTime::Infinite::BEGIN@6
11110µs29µsDateTime::Infinite::::BEGIN@7 DateTime::Infinite::BEGIN@7
1118µs92µsDateTime::Infinite::::BEGIN@12 DateTime::Infinite::BEGIN@12
1118µs58µsDateTime::Infinite::Past::::BEGIN@68 DateTime::Infinite::Past::BEGIN@68
1118µs58µsDateTime::Infinite::Future::::BEGIN@44DateTime::Infinite::Future::BEGIN@44
1117µs22µsDateTime::Infinite::::BEGIN@15 DateTime::Infinite::BEGIN@15
1116µs6µsDateTime::Infinite::::BEGIN@10 DateTime::Infinite::BEGIN@10
2116µs6µsDateTime::Infinite::::_rd2ymd DateTime::Infinite::_rd2ymd
1115µs5µsDateTime::Infinite::::BEGIN@9 DateTime::Infinite::BEGIN@9
2113µs3µsDateTime::Infinite::::_seconds_as_components DateTime::Infinite::_seconds_as_components
0000s0sDateTime::Infinite::Future::::newDateTime::Infinite::Future::new
0000s0sDateTime::Infinite::Past::::new DateTime::Infinite::Past::new
0000s0sDateTime::Infinite::::STORABLE_freeze DateTime::Infinite::STORABLE_freeze
0000s0sDateTime::Infinite::::STORABLE_thaw DateTime::Infinite::STORABLE_thaw
0000s0sDateTime::Infinite::::__ANON__[:16] DateTime::Infinite::__ANON__[:16]
0000s0sDateTime::Infinite::::_stringify DateTime::Infinite::_stringify
0000s0sDateTime::Infinite::::is_finite DateTime::Infinite::is_finite
0000s0sDateTime::Infinite::::is_infinite DateTime::Infinite::is_infinite
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package DateTime::Infinite;
2{
321µs $DateTime::Infinite::VERSION = '0.74';
4}
5
6325µs233µs
# spent 27µs (21+6) within DateTime::Infinite::BEGIN@6 which was called: # once (21µs+6µs) by Tapper::Schema::TestrunDB::ResultSet::Testrun::BEGIN@12 at line 6
use strict;
# spent 27µs making 1 call to DateTime::Infinite::BEGIN@6 # spent 6µs making 1 call to strict::import
7320µs248µs
# spent 29µs (10+19) within DateTime::Infinite::BEGIN@7 which was called: # once (10µs+19µs) by Tapper::Schema::TestrunDB::ResultSet::Testrun::BEGIN@12 at line 7
use warnings;
# spent 29µs making 1 call to DateTime::Infinite::BEGIN@7 # spent 19µs making 1 call to warnings::import
8
9318µs15µs
# spent 5µs within DateTime::Infinite::BEGIN@9 which was called: # once (5µs+0s) by Tapper::Schema::TestrunDB::ResultSet::Testrun::BEGIN@12 at line 9
use DateTime;
# spent 5µs making 1 call to DateTime::Infinite::BEGIN@9
10323µs16µs
# spent 6µs within DateTime::Infinite::BEGIN@10 which was called: # once (6µs+0s) by Tapper::Schema::TestrunDB::ResultSet::Testrun::BEGIN@12 at line 10
use DateTime::TimeZone;
# spent 6µs making 1 call to DateTime::Infinite::BEGIN@10
11
12332µs2175µs
# spent 92µs (8+83) within DateTime::Infinite::BEGIN@12 which was called: # once (8µs+83µs) by Tapper::Schema::TestrunDB::ResultSet::Testrun::BEGIN@12 at line 12
use base qw(DateTime);
# spent 92µs making 1 call to DateTime::Infinite::BEGIN@12 # spent 83µs making 1 call to base::import
13
141900nsforeach my $m (qw( set set_time_zone truncate )) {
153193µs237µs
# spent 22µs (7+15) within DateTime::Infinite::BEGIN@15 which was called: # once (7µs+15µs) by Tapper::Schema::TestrunDB::ResultSet::Testrun::BEGIN@12 at line 15
no strict 'refs';
# spent 22µs making 1 call to DateTime::Infinite::BEGIN@15 # spent 15µs making 1 call to strict::unimport
16318µs *{"DateTime::Infinite::$m"} = sub { return $_[0] };
17}
18
19sub is_finite {0}
20sub is_infinite {1}
21
22
# spent 6µs within DateTime::Infinite::_rd2ymd which was called 2 times, avg 3µs/call: # 2 times (6µs+0s) by DateTime::_calc_local_components at line 437 of DateTime.pm, avg 3µs/call
sub _rd2ymd {
2329µs return $_[2] ? ( $_[1] ) x 7 : ( $_[1] ) x 3;
24}
25
26
# spent 3µs within DateTime::Infinite::_seconds_as_components which was called 2 times, avg 2µs/call: # 2 times (3µs+0s) by DateTime::_calc_local_components at line 442 of DateTime.pm, avg 2µs/call
sub _seconds_as_components {
2726µs return ( $_[1] ) x 3;
28}
29
30sub _stringify {
31 $_[0]->{utc_rd_days} == DateTime::INFINITY
32 ? DateTime::INFINITY . ''
33 : DateTime::NEG_INFINITY . '';
34}
35
36sub STORABLE_freeze {return}
37sub STORABLE_thaw {return}
38
39package DateTime::Infinite::Future;
40{
412600ns $DateTime::Infinite::Future::VERSION = '0.74';
42}
43
44396µs2107µs
# spent 58µs (8+50) within DateTime::Infinite::Future::BEGIN@44 which was called: # once (8µs+50µs) by Tapper::Schema::TestrunDB::ResultSet::Testrun::BEGIN@12 at line 44
use base qw(DateTime::Infinite);
# spent 58µs making 1 call to DateTime::Infinite::Future::BEGIN@44 # spent 50µs making 1 call to base::import
45
46{
47287µs1111µs my $Pos = bless {
# spent 111µs making 1 call to DateTime::TimeZone::new
48 utc_rd_days => DateTime::INFINITY,
49 utc_rd_secs => DateTime::INFINITY,
50 local_rd_days => DateTime::INFINITY,
51 local_rd_secs => DateTime::INFINITY,
52 rd_nanosecs => DateTime::INFINITY,
53 tz => DateTime::TimeZone->new( name => 'floating' ),
54 },
55 __PACKAGE__;
56
5714µs134µs $Pos->_calc_utc_rd;
# spent 34µs making 1 call to DateTime::_calc_utc_rd
5816µs152µs $Pos->_calc_local_rd;
# spent 52µs making 1 call to DateTime::_calc_local_rd
59
60 sub new {$Pos}
61}
62
63package DateTime::Infinite::Past;
64{
652700ns $DateTime::Infinite::Past::VERSION = '0.74';
66}
67
68392µs2108µs
# spent 58µs (8+50) within DateTime::Infinite::Past::BEGIN@68 which was called: # once (8µs+50µs) by Tapper::Schema::TestrunDB::ResultSet::Testrun::BEGIN@12 at line 68
use base qw(DateTime::Infinite);
# spent 58µs making 1 call to DateTime::Infinite::Past::BEGIN@68 # spent 50µs making 1 call to base::import
69
70{
71273µs140µs my $Neg = bless {
# spent 40µs making 1 call to DateTime::TimeZone::new
72 utc_rd_days => DateTime::NEG_INFINITY,
73 utc_rd_secs => DateTime::NEG_INFINITY,
74 local_rd_days => DateTime::NEG_INFINITY,
75 local_rd_secs => DateTime::NEG_INFINITY,
76 rd_nanosecs => DateTime::NEG_INFINITY,
77 tz => DateTime::TimeZone->new( name => 'floating' ),
78 },
79 __PACKAGE__;
80
8113µs113µs $Neg->_calc_utc_rd;
# spent 13µs making 1 call to DateTime::_calc_utc_rd
8214µs128µs $Neg->_calc_local_rd;
# spent 28µs making 1 call to DateTime::_calc_local_rd
83
84 sub new {$Neg}
85}
86
87112µs1;
88
89# ABSTRACT: Infinite past and future DateTime objects
90
- -
93=pod
94
95=head1 NAME
96
97DateTime::Infinite - Infinite past and future DateTime objects
98
99=head1 VERSION
100
101version 0.74
102
103=head1 SYNOPSIS
104
105 my $future = DateTime::Infinite::Future->new();
106 my $past = DateTime::Infinite::Past->new();
107
108=head1 DESCRIPTION
109
110This module provides two L<DateTime.pm|DateTime> subclasses,
111C<DateTime::Infinite::Future> and C<DateTime::Infinite::Past>.
112
113The objects are in the "floating" timezone, and this cannot be
114changed.
115
116=head1 BUGS
117
118There seem to be lots of problems when dealing with infinite numbers
119on Win32. This may be a problem with this code, Perl, or Win32's IEEE
120math implementation. Either way, the module may not be well-behaved
121on Win32 operating systems.
122
123=head1 METHODS
124
125The only constructor for these two classes is the C<new()> method, as
126shown in the L<SYNOPSIS|/SYNOPSIS>. This method takes no parameters.
127
128All "get" methods in this module simply return infinity, positive or
129negative. If the method is expected to return a string, it return the
130string representation of positive or negative infinity used by your
131system. For example, on my system calling C<year()> returns a number
132which when printed appears either "inf" or "-inf".
133
134The object is not mutable, so the C<set()>, C<set_time_zone()>, and
135C<truncate()> methods are all do-nothing methods that simply return
136the object they are called with.
137
138Obviously, the C<is_finite()> method returns false and the
139C<is_infinite()> method returns true.
140
141=head1 SEE ALSO
142
143datetime@perl.org mailing list
144
145http://datetime.perl.org/
146
147=head1 AUTHOR
148
149Dave Rolsky <autarch@urth.org>
150
151=head1 COPYRIGHT AND LICENSE
152
153This software is Copyright (c) 2012 by Dave Rolsky.
154
155This is free software, licensed under:
156
157 The Artistic License 2.0 (GPL Compatible)
158
159=cut
160
161
162__END__