← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/share/koha/opac/cgi-bin/opac/opac-search.pl
  Run on Tue Oct 15 17:10:45 2013
Reported on Tue Oct 15 17:12:22 2013

Filename/usr/share/perl5/DateTime/TimeZone/OffsetOnly.pm
StatementsExecuted 24 statements in 756µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111442µs1.74msDateTime::TimeZone::OffsetOnly::::BEGIN@12DateTime::TimeZone::OffsetOnly::BEGIN@12
111354µs521µsDateTime::TimeZone::OffsetOnly::::BEGIN@11DateTime::TimeZone::OffsetOnly::BEGIN@11
11132µs39µsDateTime::TimeZone::OffsetOnly::::BEGIN@3DateTime::TimeZone::OffsetOnly::BEGIN@3
11110µs36µsDateTime::TimeZone::OffsetOnly::::BEGIN@5DateTime::TimeZone::OffsetOnly::BEGIN@5
11110µs84µsDateTime::TimeZone::OffsetOnly::::BEGIN@9DateTime::TimeZone::OffsetOnly::BEGIN@9
1116µs6µsDateTime::TimeZone::OffsetOnly::::BEGIN@8DateTime::TimeZone::OffsetOnly::BEGIN@8
4216µs6µsDateTime::TimeZone::OffsetOnly::::is_utcDateTime::TimeZone::OffsetOnly::is_utc
0000s0sDateTime::TimeZone::OffsetOnly::::STORABLE_freezeDateTime::TimeZone::OffsetOnly::STORABLE_freeze
0000s0sDateTime::TimeZone::OffsetOnly::::STORABLE_thawDateTime::TimeZone::OffsetOnly::STORABLE_thaw
0000s0sDateTime::TimeZone::OffsetOnly::::categoryDateTime::TimeZone::OffsetOnly::category
0000s0sDateTime::TimeZone::OffsetOnly::::is_dst_for_datetimeDateTime::TimeZone::OffsetOnly::is_dst_for_datetime
0000s0sDateTime::TimeZone::OffsetOnly::::newDateTime::TimeZone::OffsetOnly::new
0000s0sDateTime::TimeZone::OffsetOnly::::offset_for_datetimeDateTime::TimeZone::OffsetOnly::offset_for_datetime
0000s0sDateTime::TimeZone::OffsetOnly::::offset_for_local_datetimeDateTime::TimeZone::OffsetOnly::offset_for_local_datetime
0000s0sDateTime::TimeZone::OffsetOnly::::short_name_for_datetimeDateTime::TimeZone::OffsetOnly::short_name_for_datetime
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package DateTime::TimeZone::OffsetOnly;
2
3342µs246µs
# spent 39µs (32+7) within DateTime::TimeZone::OffsetOnly::BEGIN@3 which was called: # once (32µs+7µs) by base::import at line 3
use strict;
# spent 39µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@3 # spent 7µs making 1 call to strict::import
4
5337µs262µs
# spent 36µs (10+26) within DateTime::TimeZone::OffsetOnly::BEGIN@5 which was called: # once (10µs+26µs) by base::import at line 5
use vars qw ($VERSION);
# spent 36µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@5 # spent 26µs making 1 call to vars::import
61800ns$VERSION = 0.02;
7
8327µs16µs
# spent 6µs within DateTime::TimeZone::OffsetOnly::BEGIN@8 which was called: # once (6µs+0s) by base::import at line 8
use DateTime::TimeZone;
# spent 6µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@8
9341µs284µs
# spent 84µs (10+75) within DateTime::TimeZone::OffsetOnly::BEGIN@9 which was called: # once (10µs+75µs) by base::import at line 9
use base 'DateTime::TimeZone';
# spent 84µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@9 # spent 75µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 75µs
10
113152µs1521µs
# spent 521µs (354+166) within DateTime::TimeZone::OffsetOnly::BEGIN@11 which was called: # once (354µs+166µs) by base::import at line 11
use DateTime::TimeZone::UTC;
# spent 521µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@11
123436µs21.85ms
# spent 1.74ms (442µs+1.30) within DateTime::TimeZone::OffsetOnly::BEGIN@12 which was called: # once (442µs+1.30ms) by base::import at line 12
use Params::Validate qw( validate SCALAR );
# spent 1.74ms making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@12 # spent 104µs making 1 call to Exporter::import
13
14sub new {
15 my $class = shift;
16 my %p = validate(
17 @_, {
18 offset => { type => SCALAR },
19 }
20 );
21
22 my $offset = DateTime::TimeZone::offset_as_seconds( $p{offset} );
23
24 die "Invalid offset: $p{offset}\n" unless defined $offset;
25
26 return DateTime::TimeZone::UTC->new unless $offset;
27
28 my $self = {
29 name => DateTime::TimeZone::offset_as_string($offset),
30 offset => $offset,
31 };
32
33 return bless $self, $class;
34}
35
36sub is_dst_for_datetime {0}
37
38sub offset_for_datetime { $_[0]->{offset} }
39sub offset_for_local_datetime { $_[0]->{offset} }
40
41416µs
# spent 6µs within DateTime::TimeZone::OffsetOnly::is_utc which was called 4 times, avg 2µs/call: # 2 times (4µs+0s) by DateTime::_calc_utc_rd at line 343 of DateTime.pm, avg 2µs/call # 2 times (2µs+0s) by DateTime::_calc_local_rd at line 384 of DateTime.pm, avg 1µs/call
sub is_utc {0}
42
43sub short_name_for_datetime { $_[0]->name }
44
45sub category {undef}
46
47sub STORABLE_freeze {
48 my $self = shift;
49
50 return $self->name;
51}
52
53sub STORABLE_thaw {
54 my $self = shift;
55 my $cloning = shift;
56 my $serialized = shift;
57
58 my $class = ref $self || $self;
59
60 my $obj;
61 if ( $class->isa(__PACKAGE__) ) {
62 $obj = __PACKAGE__->new( offset => $serialized );
63 }
64 else {
65 $obj = $class->new( offset => $serialized );
66 }
67
68 %$self = %$obj;
69
70 return $self;
71}
72
7313µs1;
74
75__END__