← Index
NYTProf Performance Profile   « line view »
For starman worker -M FindBin --max-requests 50 --workers 2 --user=kohadev-koha --group kohadev-koha --pid /var/run/koha/kohadev/plack.pid --daemonize --access-log /var/log/koha/kohadev/plack.log --error-log /var/log/koha/kohadev/plack-error.log -E deployment --socket /var/run/koha/kohadev/plack.sock /etc/koha/sites/kohadev/plack.psgi
  Run on Fri Jan 8 14:31:06 2016
Reported on Fri Jan 8 14:31:39 2016

Filename/usr/share/perl5/CGI/Session/Driver/mysql.pm
StatementsExecuted 37 statements in 2.51ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.17ms1.72msCGI::Session::Driver::mysql::::BEGIN@7CGI::Session::Driver::mysql::BEGIN@7
21143µs1.88msCGI::Session::Driver::mysql::::storeCGI::Session::Driver::mysql::store
21129µs38µsCGI::Session::Driver::mysql::::initCGI::Session::Driver::mysql::init
42219µs31µsCGI::Session::Driver::mysql::::table_nameCGI::Session::Driver::mysql::table_name
11116µs28µsCGI::Session::Driver::mysql::::BEGIN@5CGI::Session::Driver::mysql::BEGIN@5
11113µs52µsCGI::Session::Driver::mysql::::BEGIN@6CGI::Session::Driver::mysql::BEGIN@6
0000s0sCGI::Session::Driver::mysql::::_mk_dsnstrCGI::Session::Driver::mysql::_mk_dsnstr
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package CGI::Session::Driver::mysql;
2
3# $Id$
4
5246µs240µs
# spent 28µs (16+12) within CGI::Session::Driver::mysql::BEGIN@5 which was called: # once (16µs+12µs) by CGI::Session::_load_pluggables at line 5
use strict;
# spent 28µs making 1 call to CGI::Session::Driver::mysql::BEGIN@5 # spent 12µs making 1 call to strict::import
6272µs290µs
# spent 52µs (13+38) within CGI::Session::Driver::mysql::BEGIN@6 which was called: # once (13µs+38µs) by CGI::Session::_load_pluggables at line 6
use Carp;
# spent 52µs making 1 call to CGI::Session::Driver::mysql::BEGIN@6 # spent 38µs making 1 call to Exporter::import
72475µs11.72ms
# spent 1.72ms (1.17+553µs) within CGI::Session::Driver::mysql::BEGIN@7 which was called: # once (1.17ms+553µs) by CGI::Session::_load_pluggables at line 7
use CGI::Session::Driver::DBI;
# spent 1.72ms making 1 call to CGI::Session::Driver::mysql::BEGIN@7
8
917µs@CGI::Session::Driver::mysql::ISA = qw( CGI::Session::Driver::DBI );
101300ns$CGI::Session::Driver::mysql::VERSION = '4.43';
11
12sub _mk_dsnstr {
13 my ($class, $dsn) = @_;
14 unless ( $class && $dsn && ref($dsn) && (ref($dsn) eq 'HASH')) {
15 croak "_mk_dsnstr(): usage error";
16 }
17
18 my $dsnstr = $dsn->{DataSource};
19 if ( $dsn->{Socket} ) {
20 $dsnstr .= sprintf(";mysql_socket=%s", $dsn->{Socket});
21 }
22 if ( $dsn->{Host} ) {
23 $dsnstr .= sprintf(";host=%s", $dsn->{Host});
24 }
25 if ( $dsn->{Port} ) {
26 $dsnstr .= sprintf(";port=%s", $dsn->{Port});
27 }
28 return $dsnstr;
29}
30
31
32
# spent 38µs (29+9) within CGI::Session::Driver::mysql::init which was called 2 times, avg 19µs/call: # 2 times (29µs+9µs) by CGI::Session::Driver::new at line 36 of CGI/Session/Driver.pm, avg 19µs/call
sub init {
332600ns my $self = shift;
3426µs if ( $self->{DataSource} && ($self->{DataSource} !~ /^dbi:mysql/i) ) {
35 $self->{DataSource} = "dbi:mysql:database=" . $self->{DataSource};
36 }
37
382800ns if ( $self->{Socket} && $self->{DataSource} ) {
39 $self->{DataSource} .= ';mysql_socket=' . $self->{Socket};
40 }
41212µs29µs return $self->SUPER::init();
# spent 9µs making 2 calls to CGI::Session::Driver::DBI::init, avg 4µs/call
42}
43
44
# spent 1.88ms (43µs+1.83) within CGI::Session::Driver::mysql::store which was called 2 times, avg 938µs/call: # 2 times (43µs+1.83ms) by CGI::Session::flush at line 251 of CGI/Session.pm, avg 938µs/call
sub store {
452900ns my $self = shift;
4621µs my ($sid, $datastr) = @_;
4721µs croak "store(): usage error" unless $sid && $datastr;
48
4921µs my $dbh = $self->{Handle};
5021.85ms41.83ms $dbh->do("INSERT INTO " . $self->table_name .
# spent 1.82ms making 2 calls to DBI::db::do, avg 909µs/call # spent 15µs making 2 calls to CGI::Session::Driver::mysql::table_name, avg 7µs/call
51 " ($self->{IdColName}, $self->{DataColName}) VALUES(?, ?) ON DUPLICATE KEY UPDATE $self->{DataColName} = ?",
52 undef, $sid, $datastr, $datastr)
53 or return $self->set_error( "store(): \$dbh->do failed " . $dbh->errstr );
54210µs return 1;
55}
56
57
58
# spent 31µs (19+12) within CGI::Session::Driver::mysql::table_name which was called 4 times, avg 8µs/call: # 2 times (10µs+6µs) by CGI::Session::Driver::DBI::retrieve at line 68 of CGI/Session/Driver/DBI.pm, avg 8µs/call # 2 times (8µs+6µs) by CGI::Session::Driver::mysql::store at line 50, avg 7µs/call
sub table_name {
594900ns my $self = shift;
60
61421µs412µs return $self->SUPER::table_name(@_);
# spent 12µs making 4 calls to CGI::Session::Driver::DBI::table_name, avg 3µs/call
62}
63
6413µs1;
65
66__END__;