← 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 11:58:52 2013
Reported on Tue Oct 15 12:01:51 2013

Filename/usr/share/perl5/DateTime/TimeZone/OffsetOnly.pm
StatementsExecuted 24 statements in 1.16ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111729µs2.75msDateTime::TimeZone::OffsetOnly::::BEGIN@12DateTime::TimeZone::OffsetOnly::BEGIN@12
111541µs771µsDateTime::TimeZone::OffsetOnly::::BEGIN@11DateTime::TimeZone::OffsetOnly::BEGIN@11
11128µs35µsDateTime::TimeZone::OffsetOnly::::BEGIN@3DateTime::TimeZone::OffsetOnly::BEGIN@3
11118µs155µsDateTime::TimeZone::OffsetOnly::::BEGIN@9DateTime::TimeZone::OffsetOnly::BEGIN@9
11116µs57µsDateTime::TimeZone::OffsetOnly::::BEGIN@5DateTime::TimeZone::OffsetOnly::BEGIN@5
42110µs10µsDateTime::TimeZone::OffsetOnly::::is_utcDateTime::TimeZone::OffsetOnly::is_utc
11110µs10µsDateTime::TimeZone::OffsetOnly::::BEGIN@8DateTime::TimeZone::OffsetOnly::BEGIN@8
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
3360µs242µs
# spent 35µs (28+7) within DateTime::TimeZone::OffsetOnly::BEGIN@3 which was called: # once (28µs+7µs) by base::import at line 3
use strict;
# spent 35µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@3 # spent 7µs making 1 call to strict::import
4
5365µs299µs
# spent 57µs (16+42) within DateTime::TimeZone::OffsetOnly::BEGIN@5 which was called: # once (16µs+42µs) by base::import at line 5
use vars qw ($VERSION);
# spent 57µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@5 # spent 42µs making 1 call to vars::import
611µs$VERSION = 0.02;
7
8350µs110µs
# spent 10µs within DateTime::TimeZone::OffsetOnly::BEGIN@8 which was called: # once (10µs+0s) by base::import at line 8
use DateTime::TimeZone;
# spent 10µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@8
9377µs2155µs
# spent 155µs (18+138) within DateTime::TimeZone::OffsetOnly::BEGIN@9 which was called: # once (18µs+138µs) by base::import at line 9
use base 'DateTime::TimeZone';
# spent 155µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@9 # spent 138µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 138µs
10
113201µs1771µs
# spent 771µs (541+229) within DateTime::TimeZone::OffsetOnly::BEGIN@11 which was called: # once (541µs+229µs) by base::import at line 11
use DateTime::TimeZone::UTC;
# spent 771µs making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@11
123670µs22.94ms
# spent 2.75ms (729µs+2.03) within DateTime::TimeZone::OffsetOnly::BEGIN@12 which was called: # once (729µs+2.03ms) by base::import at line 12
use Params::Validate qw( validate SCALAR );
# spent 2.75ms making 1 call to DateTime::TimeZone::OffsetOnly::BEGIN@12 # spent 190µ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
41424µs
# spent 10µs within DateTime::TimeZone::OffsetOnly::is_utc which was called 4 times, avg 3µs/call: # 2 times (6µs+0s) by DateTime::_calc_utc_rd at line 343 of DateTime.pm, avg 3µs/call # 2 times (5µs+0s) by DateTime::_calc_local_rd at line 384 of DateTime.pm, avg 2µ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
7317µs1;
74
75__END__