← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:26:46 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/LoginManager/Session.pm
StatementsExecuted 16 statements in 601µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1116.68ms7.45msFoswiki::LoginManager::Session::::BEGIN@22Foswiki::LoginManager::Session::BEGIN@22
11144µs114msFoswiki::LoginManager::Session::::loadFoswiki::LoginManager::Session::load
11125µs34µsFoswiki::LoginManager::Session::::BEGIN@19Foswiki::LoginManager::Session::BEGIN@19
11122µs44µsFoswiki::LoginManager::Session::::BEGIN@20Foswiki::LoginManager::Session::BEGIN@20
11110µs10µsFoswiki::LoginManager::Session::::queryFoswiki::LoginManager::Session::query
0000s0sFoswiki::LoginManager::Session::::_ip_matchesFoswiki::LoginManager::Session::_ip_matches
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# See bottom of file for license and copyright information
2
3=begin TML
4
5---+!! package Foswiki::LoginManager::Session
6
7Class to provide CGI::Session like infra-structure, compatible with
8Runtime Engine mechanisms other than CGI.
9
10It inherits from CGI::Session and redefine methods that uses %ENV directly,
11replacing by calls to Foswiki::Request object, that is passed to constructor.
12
13It also redefines =name= method, to avoid creating CGI object.
14
15=cut
16
17package Foswiki::LoginManager::Session;
18
19247µs242µs
# spent 34µs (25+8) within Foswiki::LoginManager::Session::BEGIN@19 which was called: # once (25µs+8µs) by Foswiki::LoginManager::BEGIN@1 at line 19
use strict;
# spent 34µs making 1 call to Foswiki::LoginManager::Session::BEGIN@19 # spent 8µs making 1 call to strict::import
20249µs266µs
# spent 44µs (22+22) within Foswiki::LoginManager::Session::BEGIN@20 which was called: # once (22µs+22µs) by Foswiki::LoginManager::BEGIN@1 at line 20
use warnings;
# spent 44µs making 1 call to Foswiki::LoginManager::Session::BEGIN@20 # spent 22µs making 1 call to warnings::import
21
222432µs17.45ms
# spent 7.45ms (6.68+767µs) within Foswiki::LoginManager::Session::BEGIN@22 which was called: # once (6.68ms+767µs) by Foswiki::LoginManager::BEGIN@1 at line 22
use CGI::Session ();
# spent 7.45ms making 1 call to Foswiki::LoginManager::Session::BEGIN@22
2319µsour @ISA = ('CGI::Session');
24
2512µs*VERSION = \$CGI::Session::VERSION;
2611µs*NAME = \$CGI::Session::NAME;
27
28
# spent 114ms (44µs+114) within Foswiki::LoginManager::Session::load which was called: # once (44µs+114ms) by CGI::Session::new at line 67 of /usr/local/src/github.com/foswiki/core/lib/CPAN/lib/CGI/Session.pm
sub load {
29341µs my $this = shift;
30
31 # SMELL: This breaks mod_perl Foswikibug:Item691
32 # local %ENV = %ENV;
3317µs $ENV{REMOTE_ADDR} = @_ == 1 ? $_[0]->remoteAddress : $_[1]->remoteAddress;
# spent 7µs making 1 call to Foswiki::Request::remoteAddress
341114ms $this->SUPER::load(@_);
# spent 114ms making 1 call to CGI::Session::load
35}
36
37
# spent 10µs within Foswiki::LoginManager::Session::query which was called: # once (10µs+0s) by CGI::Session::load at line 731 of /usr/local/src/github.com/foswiki/core/lib/CPAN/lib/CGI/Session.pm
sub query {
3824µs my $self = shift;
39
4019µs if ( $self->{_QUERY} ) {
41 return $self->{_QUERY};
42 }
43 return $self->{_QUERY} = Foswiki::Request->new();
44}
45
46sub _ip_matches {
47 return (
48 $_[0]->{_DATA}->{_SESSION_REMOTE_ADDR} eq $_[0]->query->remoteAddress );
49}
50
5117µs1;
52__END__