← 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:02 2013

Filename/usr/lib/perl/5.10/IO/File.pm
StatementsExecuted 62 statements in 1.86ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1112.04ms2.23msIO::File::::BEGIN@12IO::File::BEGIN@12
111946µs1.05msIO::File::::BEGIN@9IO::File::BEGIN@9
111629µs6.62msIO::File::::BEGIN@11IO::File::BEGIN@11
111360µs524µsIO::File::::BEGIN@10IO::File::BEGIN@10
311244µs244µsIO::File::::CORE:openIO::File::CORE:open (opcode)
322118µs482µsIO::File::::newIO::File::new
32275µs319µsIO::File::::openIO::File::open
11142µs42µsIO::File::::BEGIN@5IO::File::BEGIN@5
681141µs41µsIO::File::::CORE:matchIO::File::CORE:match (opcode)
11125µs106µsIO::File::::BEGIN@8IO::File::BEGIN@8
11113µs18µ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
5365µs142µs
# spent 42µs within IO::File::BEGIN@5 which was called: # once (42µs+0s) by C4::Context::BEGIN@3 at line 5
use 5.006_001;
# spent 42µs making 1 call to IO::File::BEGIN@5
6379µs223µs
# spent 18µs (13+5) within IO::File::BEGIN@6 which was called: # once (13µs+5µs) by C4::Context::BEGIN@3 at line 6
use strict;
# spent 18µs making 1 call to IO::File::BEGIN@6 # spent 5µs making 1 call to strict::import
711µsour($VERSION, @EXPORT, @EXPORT_OK, @ISA);
8347µs2188µs
# spent 106µs (25+81) within IO::File::BEGIN@8 which was called: # once (25µs+81µs) by C4::Context::BEGIN@3 at line 8
use Carp;
# spent 106µs making 1 call to IO::File::BEGIN@8 # spent 81µs making 1 call to Exporter::import
93168µs21.13ms
# spent 1.05ms (946µs+107µs) within IO::File::BEGIN@9 which was called: # once (946µs+107µs) by C4::Context::BEGIN@3 at line 9
use Symbol;
# spent 1.05ms making 1 call to IO::File::BEGIN@9 # spent 75µs making 1 call to Exporter::import
103186µs1524µs
# spent 524µs (360+165) within IO::File::BEGIN@10 which was called: # once (360µs+165µs) by C4::Context::BEGIN@3 at line 10
use SelectSaver;
# spent 524µs making 1 call to IO::File::BEGIN@10
113166µs26.69ms
# spent 6.62ms (629µs+5.99) within IO::File::BEGIN@11 which was called: # once (629µs+5.99ms) by C4::Context::BEGIN@3 at line 11
use IO::Seekable;
# spent 6.62ms making 1 call to IO::File::BEGIN@11 # spent 69µs making 1 call to Exporter::import
123516µs12.23ms
# spent 2.23ms (2.04+188µs) within IO::File::BEGIN@12 which was called: # once (2.04ms+188µs) by C4::Context::BEGIN@3 at line 12
use File::Spec;
# spent 2.23ms making 1 call to IO::File::BEGIN@12
13
1411µsrequire Exporter;
15
16126µs@ISA = qw(IO::Handle IO::Seekable Exporter);
17
181400ns$VERSION = "1.14";
19
2012µs@EXPORT = @IO::Seekable::EXPORT;
21
221900nseval {
23 # Make all Fcntl O_XXX constants available for importing
241600ns require Fcntl;
251141µs6841µs my @O = grep /^O_/, @Fcntl::EXPORT;
# spent 41µs making 68 calls to IO::File::CORE:match, avg 596ns/call
2618µs1208µs Fcntl->import(@O); # first we import what we want to export
# spent 208µs making 1 call to Exporter::import
2718µs push(@EXPORT, @O);
28};
29
30################################################
31## Constructor
32##
33
34
# spent 482µs (118+364) within IO::File::new which was called 3 times, avg 161µs/call: # 2 times (81µs+71µs) by Date::Manip::TZ::_get_curr_zone at line 415 of Date/Manip/TZ.pm, avg 76µs/call # once (37µs+293µs) by ZOOM::Query::CCL2RPN::new at line 642 of ZOOM.pm
sub new {
3518111µs my $type = shift;
36 my $class = ref($type) || $type || "IO::File";
37 @_ >= 0 && @_ <= 3
38 or croak "usage: new $class [FILENAME [,MODE [,PERMS]]]";
393141µs my $fh = $class->SUPER::new();
# spent 141µs making 3 calls to IO::Handle::new, avg 47µs/call
401223µs if (@_) {
# spent 223µ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 319µs (75+244) within IO::File::open which was called 3 times, avg 106µs/call: # 2 times (27µs+69µs) by Date::Manip::TZ::_get_curr_zone at line 416 of Date/Manip/TZ.pm, avg 48µs/call # once (49µs+174µs) by IO::File::new at line 40
sub open {
5212324µ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 }
663244µs open($fh, $file);
# spent 244µs making 3 calls to IO::File::CORE:open, avg 81µ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 41µs within IO::File::CORE:match which was called 68 times, avg 596ns/call: # 68 times (41µs+0s) by C4::Context::BEGIN@3 at line 25, avg 596ns/call
sub IO::File::CORE:match; # opcode
# spent 244µs within IO::File::CORE:open which was called 3 times, avg 81µs/call: # 3 times (244µs+0s) by IO::File::open at line 66, avg 81µs/call
sub IO::File::CORE:open; # opcode