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

Filename/usr/lib/perl/5.10/IO/Socket/UNIX.pm
StatementsExecuted 15 statements in 480µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11122µs28µsIO::Socket::UNIX::::BEGIN@9IO::Socket::UNIX::BEGIN@9
11116µs79µsIO::Socket::UNIX::::BEGIN@12IO::Socket::UNIX::BEGIN@12
11111µs1.13msIO::Socket::UNIX::::BEGIN@11IO::Socket::UNIX::BEGIN@11
0000s0sIO::Socket::UNIX::::configureIO::Socket::UNIX::configure
0000s0sIO::Socket::UNIX::::hostpathIO::Socket::UNIX::hostpath
0000s0sIO::Socket::UNIX::::newIO::Socket::UNIX::new
0000s0sIO::Socket::UNIX::::peerpathIO::Socket::UNIX::peerpath
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# IO::Socket::UNIX.pm
2#
3# Copyright (c) 1997-8 Graham Barr <gbarr@pobox.com>. All rights reserved.
4# This program is free software; you can redistribute it and/or
5# modify it under the same terms as Perl itself.
6
7package IO::Socket::UNIX;
8
9357µs234µs
# spent 28µs (22+6) within IO::Socket::UNIX::BEGIN@9 which was called: # once (22µs+6µs) by Net::LDAP::BEGIN@8 at line 9
use strict;
# spent 28µs making 1 call to IO::Socket::UNIX::BEGIN@9 # spent 6µs making 1 call to strict::import
101700nsour(@ISA, $VERSION);
11347µs22.25ms
# spent 1.13ms (11µs+1.12) within IO::Socket::UNIX::BEGIN@11 which was called: # once (11µs+1.12ms) by Net::LDAP::BEGIN@8 at line 11
use IO::Socket;
# spent 1.13ms making 1 call to IO::Socket::UNIX::BEGIN@11 # spent 1.12ms making 1 call to IO::Socket::import
123330µs2142µs
# spent 79µs (16+63) within IO::Socket::UNIX::BEGIN@12 which was called: # once (16µs+63µs) by Net::LDAP::BEGIN@8 at line 12
use Carp;
# spent 79µs making 1 call to IO::Socket::UNIX::BEGIN@12 # spent 63µs making 1 call to Exporter::import
13
1419µs@ISA = qw(IO::Socket);
151500ns$VERSION = "1.23";
16123µs$VERSION = eval $VERSION;
# spent 4µs executing statements in string eval
17
1817µs15µsIO::Socket::UNIX->register_domain( AF_UNIX );
# spent 5µs making 1 call to IO::Socket::register_domain
19
20sub new {
21 my $class = shift;
22 unshift(@_, "Peer") if @_ == 1;
23 return $class->SUPER::new(@_);
24}
25
26sub configure {
27 my($sock,$arg) = @_;
28 my($bport,$cport);
29
30 my $type = $arg->{Type} || SOCK_STREAM;
31
32 $sock->socket(AF_UNIX, $type, 0) or
33 return undef;
34
35 if(exists $arg->{Local}) {
36 my $addr = sockaddr_un($arg->{Local});
37 $sock->bind($addr) or
38 return undef;
39 }
40 if(exists $arg->{Listen} && $type != SOCK_DGRAM) {
41 $sock->listen($arg->{Listen} || 5) or
42 return undef;
43 }
44 elsif(exists $arg->{Peer}) {
45 my $addr = sockaddr_un($arg->{Peer});
46 $sock->connect($addr) or
47 return undef;
48 }
49
50 $sock;
51}
52
53sub hostpath {
54 @_ == 1 or croak 'usage: $sock->hostpath()';
55 my $n = $_[0]->sockname || return undef;
56 (sockaddr_un($n))[0];
57}
58
59sub peerpath {
60 @_ == 1 or croak 'usage: $sock->peerpath()';
61 my $n = $_[0]->peername || return undef;
62 (sockaddr_un($n))[0];
63}
64
6515µs1; # Keep require happy
66
67__END__