← Index
NYTProf Performance Profile   « line view »
For svc/members/upsert
  Run on Tue Jan 13 11:50:22 2015
Reported on Tue Jan 13 12:09:51 2015

Filename/usr/share/perl5/CGI/Session/Driver.pm
StatementsExecuted 17 statements in 580µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11117µs46µsCGI::Session::Driver::::newCGI::Session::Driver::new
11111µs21µsCGI::Session::Driver::::BEGIN@3CGI::Session::Driver::BEGIN@3
1119µs46µsCGI::Session::Driver::::BEGIN@6CGI::Session::Driver::BEGIN@6
1119µs9µsCGI::Session::Driver::::BEGIN@7CGI::Session::Driver::BEGIN@7
0000s0sCGI::Session::Driver::::dumpCGI::Session::Driver::dump
0000s0sCGI::Session::Driver::::initCGI::Session::Driver::init
0000s0sCGI::Session::Driver::::removeCGI::Session::Driver::remove
0000s0sCGI::Session::Driver::::retrieveCGI::Session::Driver::retrieve
0000s0sCGI::Session::Driver::::storeCGI::Session::Driver::store
0000s0sCGI::Session::Driver::::traverseCGI::Session::Driver::traverse
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;
2
3224µs232µs
# spent 21µs (11+11) within CGI::Session::Driver::BEGIN@3 which was called: # once (11µs+11µs) by CGI::Session::Driver::DBI::BEGIN@9 at line 3
use strict;
# spent 21µs making 1 call to CGI::Session::Driver::BEGIN@3 # spent 11µs making 1 call to strict::import
4#
5
6234µs284µs
# spent 46µs (9+37) within CGI::Session::Driver::BEGIN@6 which was called: # once (9µs+37µs) by CGI::Session::Driver::DBI::BEGIN@9 at line 6
use Carp;
# spent 46µs making 1 call to CGI::Session::Driver::BEGIN@6 # spent 37µs making 1 call to Exporter::import
72490µs19µs
# spent 9µs within CGI::Session::Driver::BEGIN@7 which was called: # once (9µs+0s) by CGI::Session::Driver::DBI::BEGIN@9 at line 7
use CGI::Session::ErrorHandler;
# spent 9µs making 1 call to CGI::Session::Driver::BEGIN@7
8
91600ns$CGI::Session::Driver::VERSION = '4.43';
1019µs@CGI::Session::Driver::ISA = qw(CGI::Session::ErrorHandler);
11
12
# spent 46µs (17+29) within CGI::Session::Driver::new which was called: # once (17µs+29µs) by CGI::Session::_driver at line 117 of CGI/Session.pm
sub new {
131400ns my $class = shift;
141400ns my $args = shift || {};
15
161800ns unless ( ref $args ) {
17 croak "$class->new(): Invalid argument type passed to driver";
18 }
19
20 # Set defaults.
21
2211µs if (! $args->{TableName}) {
23 $args->{TableName} = 'sessions';
24 }
25
261800ns if (! $args->{IdColName}) {
27 $args->{IdColName} = 'id';
28 }
29
301900ns if (! $args->{DataColName}) {
31 $args->{DataColName} = 'a_session';
32 }
33
34 # perform a shallow copy of $args, to prevent modification
3515µs my $self = bless ({%$args}, $class);
3618µs129µs return $self if $self->init();
# spent 29µs making 1 call to CGI::Session::Driver::mysql::init
37 return $self->set_error( "$class->init() returned false");
38}
39
40sub init { 1 }
41
42sub retrieve {
43 croak "retrieve(): " . ref($_[0]) . " failed to implement this method!";
44}
45
46sub store {
47 croak "store(): " . ref($_[0]) . " failed to implement this method!";
48}
49
50sub remove {
51 croak "remove(): " . ref($_[0]) . " failed to implement this method!";
52}
53
54sub traverse {
55 croak "traverse(): " . ref($_[0]) . " failed to implement this method!";
56}
57
58sub dump {
59 require Data::Dumper;
60 my $d = Data::Dumper->new([$_[0]], [ref $_[0]]);
61 return $d->Dump;
62}
63
64
6514µs1;
66
67__END__;