← 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:33:30 2016

Filename/usr/share/perl5/CGI/Session/Driver/mysql.pm
StatementsExecuted 28 statements in 1.81ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.35ms2.01msCGI::Session::Driver::mysql::::BEGIN@7CGI::Session::Driver::mysql::BEGIN@7
1822319µs438µsCGI::Session::Driver::mysql::::table_nameCGI::Session::Driver::mysql::table_name
911231µs7.99msCGI::Session::Driver::mysql::::storeCGI::Session::Driver::mysql::store
91193µs143µsCGI::Session::Driver::mysql::::initCGI::Session::Driver::mysql::init
11119µs32µsCGI::Session::Driver::mysql::::BEGIN@5CGI::Session::Driver::mysql::BEGIN@5
11114µs54µ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µs
# spent 32µs (19+13) within CGI::Session::Driver::mysql::BEGIN@5 which was called: # once (19µs+13µs) by CGI::Session::_load_pluggables at line 5
use strict;
# spent 32µs making 1 call to CGI::Session::Driver::mysql::BEGIN@5 # spent 13µs making 1 call to strict::import
6294µs
# spent 54µs (14+40) within CGI::Session::Driver::mysql::BEGIN@6 which was called: # once (14µs+40µs) by CGI::Session::_load_pluggables at line 6
use Carp;
# spent 54µs making 1 call to CGI::Session::Driver::mysql::BEGIN@6 # spent 40µs making 1 call to Exporter::import
712.01ms
# spent 2.01ms (1.35+662µs) within CGI::Session::Driver::mysql::BEGIN@7 which was called: # once (1.35ms+662µs) by CGI::Session::_load_pluggables at line 7
use CGI::Session::Driver::DBI;
# spent 2.01ms making 1 call to CGI::Session::Driver::mysql::BEGIN@7
8
9@CGI::Session::Driver::mysql::ISA = qw( CGI::Session::Driver::DBI );
10$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 143µs (93+50) within CGI::Session::Driver::mysql::init which was called 9 times, avg 16µs/call: # 9 times (93µs+50µs) by CGI::Session::Driver::new at line 36 of CGI/Session/Driver.pm, avg 16µs/call
sub init {
332700ns my $self = shift;
3421µs if ( $self->{DataSource} && ($self->{DataSource} !~ /^dbi:mysql/i) ) {
35 $self->{DataSource} = "dbi:mysql:database=" . $self->{DataSource};
36 }
37
3821µs if ( $self->{Socket} && $self->{DataSource} ) {
39 $self->{DataSource} .= ';mysql_socket=' . $self->{Socket};
40 }
41210µs950µs return $self->SUPER::init();
# spent 50µs making 9 calls to CGI::Session::Driver::DBI::init, avg 6µs/call
42}
43
44
# spent 7.99ms (231µs+7.76) within CGI::Session::Driver::mysql::store which was called 9 times, avg 888µs/call: # 9 times (231µs+7.76ms) by CGI::Session::flush at line 251 of CGI/Session.pm, avg 888µs/call
sub store {
452900ns my $self = shift;
4621µs my ($sid, $datastr) = @_;
472700ns croak "store(): usage error" unless $sid && $datastr;
48
4922µs my $dbh = $self->{Handle};
5021.76ms187.76ms $dbh->do("INSERT INTO " . $self->table_name .
# spent 7.41ms making 9 calls to DBI::db::do, avg 824µs/call # spent 349µs making 9 calls to CGI::Session::Driver::mysql::table_name, avg 39µ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 );
54214µs return 1;
55}
56
57
58
# spent 438µs (319+119) within CGI::Session::Driver::mysql::table_name which was called 18 times, avg 24µs/call: # 9 times (263µs+86µs) by CGI::Session::Driver::mysql::store at line 50, avg 39µs/call # 9 times (56µs+33µs) by CGI::Session::Driver::DBI::retrieve at line 68 of CGI/Session/Driver/DBI.pm, avg 10µs/call
sub table_name {
5942µs my $self = shift;
60
61415µs18119µs return $self->SUPER::table_name(@_);
# spent 119µs making 18 calls to CGI::Session::Driver::DBI::table_name, avg 7µs/call
62}
63
641;
65
66__END__;