← 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:47 2015

Filename/mnt/catalyst/koha/C4/Debug.pm
StatementsExecuted 17 statements in 473µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111532µs547µsC4::Debug::::BEGIN@20C4::Debug::BEGIN@20
11112µs16µsC4::Debug::::BEGIN@37C4::Debug::BEGIN@37
11110µs10µsC4::Debug::::BEGIN@29C4::Debug::BEGIN@29
1119µs28µsC4::Debug::::BEGIN@23C4::Debug::BEGIN@23
1119µs16µsC4::Debug::::BEGIN@21C4::Debug::BEGIN@21
1117µs66µsC4::Debug::::BEGIN@26C4::Debug::BEGIN@26
2213µs3µsC4::Debug::::CORE:matchC4::Debug::CORE:match (opcode)
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package C4::Debug;
2
3# Copyright 2000-2002 Katipo Communications
4#
5# This file is part of Koha.
6#
7# Koha is free software; you can redistribute it and/or modify it under the
8# terms of the GNU General Public License as published by the Free Software
9# Foundation; either version 2 of the License, or (at your option) any later
10# version.
11#
12# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with Koha; if not, write to the Free Software Foundation, Inc.,
18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20234µs2562µs
# spent 547µs (532+15) within C4::Debug::BEGIN@20 which was called: # once (532µs+15µs) by C4::Context::BEGIN@104 at line 20
use strict;
# spent 547µs making 1 call to C4::Debug::BEGIN@20 # spent 15µs making 1 call to strict::import
21226µs224µs
# spent 16µs (9+7) within C4::Debug::BEGIN@21 which was called: # once (9µs+7µs) by C4::Context::BEGIN@104 at line 21
use warnings;
# spent 16µs making 1 call to C4::Debug::BEGIN@21 # spent 7µs making 1 call to warnings::import
22
23231µs246µs
# spent 28µs (9+18) within C4::Debug::BEGIN@23 which was called: # once (9µs+18µs) by C4::Context::BEGIN@104 at line 23
use Exporter;
# spent 28µs making 1 call to C4::Debug::BEGIN@23 # spent 18µs making 1 call to Exporter::import
24
25# use CGI;
26250µs2124µs
# spent 66µs (7+59) within C4::Debug::BEGIN@26 which was called: # once (7µs+59µs) by C4::Context::BEGIN@104 at line 26
use vars qw($VERSION @ISA @EXPORT $debug $cgi_debug);
# spent 66µs making 1 call to C4::Debug::BEGIN@26 # spent 59µs making 1 call to vars::import
27# use vars qw(@EXPORT_OK %EXPORT_TAGS);
28
29
# spent 10µs within C4::Debug::BEGIN@29 which was called: # once (10µs+0s) by C4::Context::BEGIN@104 at line 35
BEGIN {
301900ns $VERSION = 3.07.00.049; # set the version for version checking
3116µs @ISA = qw(Exporter);
3214µs @EXPORT = qw($debug $cgi_debug);
33 # @EXPOR_OK = qw();
34 # %EXPORT_TAGS = ( all=>[qw($debug $cgi_debug)], );
351162µs110µs}
# spent 10µs making 1 call to C4::Debug::BEGIN@29
36
37
# spent 16µs (12+3) within C4::Debug::BEGIN@37 which was called: # once (12µs+3µs) by C4::Context::BEGIN@104 at line 66
BEGIN {
38 # this stuff needs a begin block too, since dependencies might alter their compilations
39 # for example, adding DataDumper
40
4111µs $debug = $ENV{KOHA_DEBUG} || $ENV{DEBUG} || 0;
42
43 # CGI->new conflicts w/ some upload functionality,
44 # since we would get the "first" CGI object here.
45 # Instead we have to parse for ourselves if we want QUERY_STRING triggers.
46 # my $query = CGI->new(); # conflicts!
47 # $cgi_debug = $ENV{KOHA_CGI_DEBUG} || $query->param('debug') || 0;
48
491600ns $cgi_debug = $ENV{KOHA_CGI_DEBUG} || 0;
501300ns unless ($cgi_debug or not $ENV{QUERY_STRING}) {
51 foreach (split /\&/, $ENV{QUERY_STRING}) {
52 /^debug\=(.+)$/ or next;
53 $cgi_debug = $1;
54 last;
55 }
56 }
5717µs12µs unless ($debug =~ /^\d$/) {
# spent 2µs making 1 call to C4::Debug::CORE:match
58 warn "Invalid \$debug value attempted: $debug";
59 $debug=1;
60 }
6115µs1900ns unless ($cgi_debug =~ /^\d$/) {
# spent 900ns making 1 call to C4::Debug::CORE:match
62 $debug and
63 warn "Invalid \$cgi_debug value attempted: $cgi_debug";
64 $cgi_debug=1;
65 }
661141µs116µs}
# spent 16µs making 1 call to C4::Debug::BEGIN@37
67
68# sub import {
69# print STDERR __PACKAGE__ . " (Debug) import @_\n";
70# C4::Debug->export_to_level(1, @_);
71# }
72
7313µs1;
74__END__
 
# spent 3µs within C4::Debug::CORE:match which was called 2 times, avg 1µs/call: # once (2µs+0s) by C4::Debug::BEGIN@37 at line 57 # once (900ns+0s) by C4::Debug::BEGIN@37 at line 61
sub C4::Debug::CORE:match; # opcode