← 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 11:58:52 2013
Reported on Tue Oct 15 12:01:12 2013

Filename/usr/share/koha/lib/C4/Debug.pm
StatementsExecuted 21 statements in 645µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11128µs35µsC4::Debug::::BEGIN@20C4::Debug::BEGIN@20
11127µs35µsC4::Debug::::BEGIN@37C4::Debug::BEGIN@37
11125µs25µsC4::Debug::::BEGIN@29C4::Debug::BEGIN@29
11118µs51µsC4::Debug::::BEGIN@21C4::Debug::BEGIN@21
11118µs54µsC4::Debug::::BEGIN@23C4::Debug::BEGIN@23
11117µs155µsC4::Debug::::BEGIN@26C4::Debug::BEGIN@26
2217µs7µ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
20346µs242µs
# spent 35µs (28+7) within C4::Debug::BEGIN@20 which was called: # once (28µs+7µs) by C4::Context::BEGIN@105 at line 20
use strict;
# spent 35µs making 1 call to C4::Debug::BEGIN@20 # spent 7µs making 1 call to strict::import
21355µs284µs
# spent 51µs (18+33) within C4::Debug::BEGIN@21 which was called: # once (18µs+33µs) by C4::Context::BEGIN@105 at line 21
use warnings;
# spent 51µs making 1 call to C4::Debug::BEGIN@21 # spent 33µs making 1 call to warnings::import
22
23352µs291µs
# spent 54µs (18+37) within C4::Debug::BEGIN@23 which was called: # once (18µs+37µs) by C4::Context::BEGIN@105 at line 23
use Exporter;
# spent 54µs making 1 call to C4::Debug::BEGIN@23 # spent 37µs making 1 call to Exporter::import
24
25# use CGI;
263112µs2294µs
# spent 155µs (17+139) within C4::Debug::BEGIN@26 which was called: # once (17µs+139µs) by C4::Context::BEGIN@105 at line 26
use vars qw($VERSION @ISA @EXPORT $debug $cgi_debug);
# spent 155µs making 1 call to C4::Debug::BEGIN@26 # spent 139µs making 1 call to vars::import
27# use vars qw(@EXPORT_OK %EXPORT_TAGS);
28
29
# spent 25µs within C4::Debug::BEGIN@29 which was called: # once (25µs+0s) by C4::Context::BEGIN@105 at line 35
BEGIN {
30324µs $VERSION = 3.07.00.049; # set the version for version checking
31 @ISA = qw(Exporter);
32 @EXPORT = qw($debug $cgi_debug);
33 # @EXPOR_OK = qw();
34 # %EXPORT_TAGS = ( all=>[qw($debug $cgi_debug)], );
351271µs125µs}
# spent 25µs making 1 call to C4::Debug::BEGIN@29
36
37
# spent 35µs (27+7) within C4::Debug::BEGIN@37 which was called: # once (27µs+7µ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
41532µ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
49 $cgi_debug = $ENV{KOHA_CGI_DEBUG} || 0;
50 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 }
5716µs unless ($debug =~ /^\d$/) {
# spent 6µs making 1 call to C4::Debug::CORE:match
58 warn "Invalid \$debug value attempted: $debug";
59 $debug=1;
60 }
6112µs unless ($cgi_debug =~ /^\d$/) {
# spent 2µ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 }
66149µs135µs}
# spent 35µ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
7314µs1;
74__END__
 
# spent 7µs within C4::Debug::CORE:match which was called 2 times, avg 4µs/call: # once (6µs+0s) by C4::Debug::BEGIN@37 at line 57 # once (2µs+0s) by C4::Debug::BEGIN@37 at line 61
sub C4::Debug::CORE:match; # opcode