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

Filename/usr/share/perl5/URI/Split.pm
StatementsExecuted 150 statements in 4.46ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
137112.13ms2.13msURI::Split::::CORE:matchURI::Split::CORE:match (opcode)
137111.34ms3.47msURI::Split::::uri_splitURI::Split::uri_split
11134µs43µsURI::Split::::BEGIN@3URI::Split::BEGIN@3
11118µs98µsURI::Split::::BEGIN@5URI::Split::BEGIN@5
1119µs9µsURI::Split::::BEGIN@10URI::Split::BEGIN@10
0000s0sURI::Split::::uri_joinURI::Split::uri_join
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package URI::Split;
2
3362µs252µs
# spent 43µs (34+9) within URI::Split::BEGIN@3 which was called: # once (34µs+9µs) by C4::Koha::getitemtypeimagelocation at line 3
use strict;
# spent 43µs making 1 call to URI::Split::BEGIN@3 # spent 9µs making 1 call to strict::import
4
5394µs2179µs
# spent 98µs (18+80) within URI::Split::BEGIN@5 which was called: # once (18µs+80µs) by C4::Koha::getitemtypeimagelocation at line 5
use vars qw(@ISA @EXPORT_OK);
# spent 98µs making 1 call to URI::Split::BEGIN@5 # spent 80µs making 1 call to vars::import
612µsrequire Exporter;
7117µs@ISA = qw(Exporter);
811µs@EXPORT_OK = qw(uri_split uri_join);
9
103676µs19µs
# spent 9µs within URI::Split::BEGIN@10 which was called: # once (9µs+0s) by C4::Koha::getitemtypeimagelocation at line 10
use URI::Escape ();
# spent 9µs making 1 call to URI::Split::BEGIN@10
11
12
# spent 3.47ms (1.34+2.13) within URI::Split::uri_split which was called 137 times, avg 25µs/call: # 137 times (1.34ms+2.13ms) by C4::Koha::getitemtypeimagelocation at line 484 of /usr/share/koha/lib/C4/Koha.pm, avg 25µs/call
sub uri_split {
131373.60ms1372.13ms return $_[0] =~ m,(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?,;
# spent 2.13ms making 137 calls to URI::Split::CORE:match, avg 16µs/call
14}
15
16sub uri_join {
17 my($scheme, $auth, $path, $query, $frag) = @_;
18 my $uri = defined($scheme) ? "$scheme:" : "";
19 $path = "" unless defined $path;
20 if (defined $auth) {
21 $auth =~ s,([/?\#]), URI::Escape::escape_char($1),eg;
22 $uri .= "//$auth";
23 $path = "/$path" if length($path) && $path !~ m,^/,;
24 }
25 elsif ($path =~ m,^//,) {
26 $uri .= "//"; # XXX force empty auth
27 }
28 unless (length $uri) {
29 $path =~ s,(:), URI::Escape::escape_char($1),e while $path =~ m,^[^:/?\#]+:,;
30 }
31 $path =~ s,([?\#]), URI::Escape::escape_char($1),eg;
32 $uri .= $path;
33 if (defined $query) {
34 $query =~ s,(\#), URI::Escape::escape_char($1),eg;
35 $uri .= "?$query";
36 }
37 $uri .= "#$frag" if defined $frag;
38 $uri;
39}
40
4117µs1;
42
43__END__
 
# spent 2.13ms within URI::Split::CORE:match which was called 137 times, avg 16µs/call: # 137 times (2.13ms+0s) by URI::Split::uri_split at line 13, avg 16µs/call
sub URI::Split::CORE:match; # opcode