← 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:11:30 2013

Filename/usr/lib/perl/5.10/IO/File.pm
StatementsExecuted 62 statements in 2.31ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1112.85ms3.07msIO::File::::BEGIN@12IO::File::BEGIN@12
1111.32ms1.39msIO::File::::BEGIN@8IO::File::BEGIN@8
111991µs1.11msIO::File::::BEGIN@9IO::File::BEGIN@9
111557µs7.34msIO::File::::BEGIN@11IO::File::BEGIN@11
111414µs644µsIO::File::::BEGIN@10IO::File::BEGIN@10
311207µs207µsIO::File::::CORE:openIO::File::CORE:open (opcode)
322110µs354µsIO::File::::newIO::File::new
32252µs259µsIO::File::::openIO::File::open
681144µs44µsIO::File::::CORE:matchIO::File::CORE:match (opcode)
11125µs25µsIO::File::::BEGIN@5IO::File::BEGIN@5
11110µs15µsIO::File::::BEGIN@6IO::File::BEGIN@6
0000s0sIO::File::::binmodeIO::File::binmode
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#
2
3package IO::File;
4
5341µs125µs
# spent 25µs within IO::File::BEGIN@5 which was called: # once (25µs+0s) by Storable::BEGIN@23 at line 5
use 5.006_001;
# spent 25µs making 1 call to IO::File::BEGIN@5
6392µs219µs
# spent 15µs (10+4) within IO::File::BEGIN@6 which was called: # once (10µs+4µs) by Storable::BEGIN@23 at line 6
use strict;
# spent 15µs making 1 call to IO::File::BEGIN@6 # spent 4µs making 1 call to strict::import
711µsour($VERSION, @EXPORT, @EXPORT_OK, @ISA);
83470µs21.46ms
# spent 1.39ms (1.32+72µs) within IO::File::BEGIN@8 which was called: # once (1.32ms+72µs) by Storable::BEGIN@23 at line 8
use Carp;
# spent 1.39ms making 1 call to IO::File::BEGIN@8 # spent 72µs making 1 call to Exporter::import
93173µs21.21ms
# spent 1.11ms (991µs+121µs) within IO::File::BEGIN@9 which was called: # once (991µs+121µs) by Storable::BEGIN@23 at line 9
use Symbol;
# spent 1.11ms making 1 call to IO::File::BEGIN@9 # spent 97µs making 1 call to Exporter::import
103244µs1644µs
# spent 644µs (414+230) within IO::File::BEGIN@10 which was called: # once (414µs+230µs) by Storable::BEGIN@23 at line 10
use SelectSaver;
# spent 644µs making 1 call to IO::File::BEGIN@10
113171µs27.41ms
# spent 7.34ms (557µs+6.79) within IO::File::BEGIN@11 which was called: # once (557µs+6.79ms) by Storable::BEGIN@23 at line 11
use IO::Seekable;
# spent 7.34ms making 1 call to IO::File::BEGIN@11 # spent 71µs making 1 call to Exporter::import
123511µs13.07ms
# spent 3.07ms (2.85+212µs) within IO::File::BEGIN@12 which was called: # once (2.85ms+212µs) by Storable::BEGIN@23 at line 12
use File::Spec;
# spent 3.07ms making 1 call to IO::File::BEGIN@12
13
141700nsrequire Exporter;
15
16122µs@ISA = qw(IO::Handle IO::Seekable Exporter);
17
181500ns$VERSION = "1.14";
19
2011µs@EXPORT = @IO::Seekable::EXPORT;
21
225200µseval {
23 # Make all Fcntl O_XXX constants available for importing
24 require Fcntl;
256844µs my @O = grep /^O_/, @Fcntl::EXPORT;
# spent 44µs making 68 calls to IO::File::CORE:match, avg 649ns/call
261288µs Fcntl->import(@O); # first we import what we want to export
# spent 288µs making 1 call to Exporter::import
27 push(@EXPORT, @O);
28};
29
30################################################
31## Constructor
32##
33
34
# spent 354µs (110+244) within IO::File::new which was called 3 times, avg 118µs/call: # 2 times (76µs+55µs) by Date::Manip::TZ::_get_curr_zone at line 415 of Date/Manip/TZ.pm, avg 66µs/call # once (34µs+189µs) by ZOOM::Query::CCL2RPN::new at line 642 of ZOOM.pm
sub new {
3518102µs my $type = shift;
36 my $class = ref($type) || $type || "IO::File";
37 @_ >= 0 && @_ <= 3
38 or croak "usage: new $class [FILENAME [,MODE [,PERMS]]]";
39387µs my $fh = $class->SUPER::new();
# spent 87µs making 3 calls to IO::Handle::new, avg 29µs/call
401158µs if (@_) {
# spent 158µs making 1 call to IO::File::open
41 $fh->open(@_)
42 or return undef;
43 }
44 $fh;
45}
46
47################################################
48## Open
49##
50
51
# spent 259µs (52+207) within IO::File::open which was called 3 times, avg 86µs/call: # 2 times (35µs+66µs) by Date::Manip::TZ::_get_curr_zone at line 416 of Date/Manip/TZ.pm, avg 51µs/call # once (17µs+140µs) by IO::File::new at line 40
sub open {
5212267µs @_ >= 2 && @_ <= 4 or croak 'usage: $fh->open(FILENAME [,MODE [,PERMS]])';
53 my ($fh, $file) = @_;
54 if (@_ > 2) {
55 my ($mode, $perms) = @_[2, 3];
56 if ($mode =~ /^\d+$/) {
57 defined $perms or $perms = 0666;
58 return sysopen($fh, $file, $mode, $perms);
59 } elsif ($mode =~ /:/) {
60 return open($fh, $mode, $file) if @_ == 3;
61 croak 'usage: $fh->open(FILENAME, IOLAYERS)';
62 } else {
63 return open($fh, IO::Handle::_open_mode_string($mode), $file);
64 }
65 }
663207µs open($fh, $file);
# spent 207µs making 3 calls to IO::File::CORE:open, avg 69µs/call
67}
68
69################################################
70## Binmode
71##
72
73sub binmode {
74 ( @_ == 1 or @_ == 2 ) or croak 'usage $fh->binmode([LAYER])';
75
76 my($fh, $layer) = @_;
77
78 return binmode $$fh unless $layer;
79 return binmode $$fh, $layer;
80}
81
82112µs1;
 
# spent 44µs within IO::File::CORE:match which was called 68 times, avg 649ns/call: # 68 times (44µs+0s) by Storable::BEGIN@23 at line 25, avg 649ns/call
sub IO::File::CORE:match; # opcode
# spent 207µs within IO::File::CORE:open which was called 3 times, avg 69µs/call: # 3 times (207µs+0s) by IO::File::open at line 66, avg 69µs/call
sub IO::File::CORE:open; # opcode