← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/share/koha/opac/cgi-bin/opac/opac-search.pl
  Run on Tue Oct 15 17:10:45 2013
Reported on Tue Oct 15 17:12:21 2013

Filename/usr/share/koha/lib/C4/Debug.pm
StatementsExecuted 21 statements in 438µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11131µs38µsC4::Debug::::BEGIN@20C4::Debug::BEGIN@20
11130µs30µsC4::Debug::::BEGIN@29C4::Debug::BEGIN@29
11123µs28µsC4::Debug::::BEGIN@37C4::Debug::BEGIN@37
11111µs90µsC4::Debug::::BEGIN@26C4::Debug::BEGIN@26
11111µs35µsC4::Debug::::BEGIN@23C4::Debug::BEGIN@23
11111µs25µsC4::Debug::::BEGIN@21C4::Debug::BEGIN@21
2215µs5µ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
20343µs245µs
# spent 38µs (31+7) within C4::Debug::BEGIN@20 which was called: # once (31µs+7µs) by C4::Context::BEGIN@105 at line 20
use strict;
# spent 38µs making 1 call to C4::Debug::BEGIN@20 # spent 7µs making 1 call to strict::import
21326µs240µs
# spent 25µs (11+14) within C4::Debug::BEGIN@21 which was called: # once (11µs+14µs) by C4::Context::BEGIN@105 at line 21
use warnings;
# spent 25µs making 1 call to C4::Debug::BEGIN@21 # spent 14µs making 1 call to warnings::import
22
23335µs260µs
# spent 35µs (11+25) within C4::Debug::BEGIN@23 which was called: # once (11µs+25µs) by C4::Context::BEGIN@105 at line 23
use Exporter;
# spent 35µs making 1 call to C4::Debug::BEGIN@23 # spent 24µs making 1 call to Exporter::import
24
25# use CGI;
26356µs2169µs
# spent 90µs (11+79) within C4::Debug::BEGIN@26 which was called: # once (11µs+79µs) by C4::Context::BEGIN@105 at line 26
use vars qw($VERSION @ISA @EXPORT $debug $cgi_debug);
# spent 90µs making 1 call to C4::Debug::BEGIN@26 # spent 79µs making 1 call to vars::import
27# use vars qw(@EXPORT_OK %EXPORT_TAGS);
28
29
# spent 30µs within C4::Debug::BEGIN@29 which was called: # once (30µs+0s) by C4::Context::BEGIN@105 at line 35
BEGIN {
3011µs $VERSION = 3.07.00.049; # set the version for version checking
31121µs @ISA = qw(Exporter);
32111µs @EXPORT = qw($debug $cgi_debug);
33 # @EXPOR_OK = qw();
34 # %EXPORT_TAGS = ( all=>[qw($debug $cgi_debug)], );
351186µs130µs}
# spent 30µs making 1 call to C4::Debug::BEGIN@29
36
37
# spent 28µs (23+5) within C4::Debug::BEGIN@37 which was called: # once (23µs+5µs) by C4::Context::BEGIN@105 at line 66
BEGIN {
38 # this stuff needs a begin block too, since dependencies might alter their compilations
39 # for example, adding DataDumper
40
4112µ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;
501600ns 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 }
57115µs14µs unless ($debug =~ /^\d$/) {
# spent 4µs making 1 call to C4::Debug::CORE:match
58 warn "Invalid \$debug value attempted: $debug";
59 $debug=1;
60 }
6118µs11µs unless ($cgi_debug =~ /^\d$/) {
# spent 1µs 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 }
66130µs128µs}
# spent 28µ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
7312µs1;
74__END__
 
# spent 5µs within C4::Debug::CORE:match which was called 2 times, avg 3µs/call: # once (4µs+0s) by C4::Debug::BEGIN@37 at line 57 # once (1µs+0s) by C4::Debug::BEGIN@37 at line 61
sub C4::Debug::CORE:match; # opcode