← Index
NYTProf Performance Profile   « line view »
For starman worker -M FindBin --max-requests 50 --workers 2 --user=kohadev-koha --group kohadev-koha --pid /var/run/koha/kohadev/plack.pid --daemonize --access-log /var/log/koha/kohadev/plack.log --error-log /var/log/koha/kohadev/plack-error.log -E deployment --socket /var/run/koha/kohadev/plack.sock /etc/koha/sites/kohadev/plack.psgi
  Run on Fri Jan 8 14:31:06 2016
Reported on Fri Jan 8 14:31:35 2016

Filename/home/vagrant/kohaclone/mainpage.pl
StatementsExecuted 44 statements in 9.81ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1119.94ms1.62sCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@25CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@25
1116.58ms7.47msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@32CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@32
1115.25ms8.36msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@30CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@30
1112.70ms3.28msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@29CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@29
1111.87ms24.4msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@24CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@24
1111.71ms1.94msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@31CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@31
1111.46ms1.61msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@28CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@28
11125µs145µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@22CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@22
11122µs278µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@26CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@26
11118µs88µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@27CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@27
11116µs68µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@23CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@23
11116µs16µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::CORE:openCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:open (opcode)
1116µs6µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::CORE:packCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:pack (opcode)
1113µs3µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::CORE:unpackCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:unpack (opcode)
0000s0sCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::__ANON__[:107]CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::__ANON__[:107]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#!/usr/bin/perl
21585µs321µs
# spent 14µs making 1 call to Template::Provider::DESTROY # spent 5µs making 1 call to Template::Context::DESTROY # spent 2µs making 1 call to Template::Stash::XS::DESTROY
3# This file is part of Koha.
4#
5# Copyright Paul Poulain 2002
6# Parts Copyright Liblime 2007
7# Copyright (C) 2013 Mark Tompsett
8#
9# Koha is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version.
13#
14# Koha is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
222176µs2265µs
# spent 145µs (25+120) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@22 which was called: # once (25µs+120µs) by CGI::Compile::_eval at line 22
use Modern::Perl;
# spent 145µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@22 # spent 120µs making 1 call to Modern::Perl::import
23295µs2120µs
# spent 68µs (16+52) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@23 which was called: # once (16µs+52µs) by CGI::Compile::_eval at line 23
use CGI qw ( -utf8 );
# spent 68µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@23 # spent 52µs making 1 call to CGI::import
2421.12ms224.5ms
# spent 24.4ms (1.87+22.5) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@24 which was called: # once (1.87ms+22.5ms) by CGI::Compile::_eval at line 24
use C4::Output;
# spent 24.4ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@24 # spent 155µs making 1 call to Exporter::import
252832µs21.62s
# spent 1.62s (9.94ms+1.61) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@25 which was called: # once (9.94ms+1.61s) by CGI::Compile::_eval at line 25
use C4::Auth;
# spent 1.62s making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@25 # spent 110µs making 1 call to Exporter::import
262304µs2535µs
# spent 278µs (22+256) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@26 which was called: # once (22µs+256µs) by CGI::Compile::_eval at line 26
use C4::Koha;
# spent 278µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@26 # spent 256µs making 1 call to Exporter::import
272116µs2159µs
# spent 88µs (18+71) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@27 which was called: # once (18µs+71µs) by CGI::Compile::_eval at line 27
use C4::NewsChannels; # GetNewsToDisplay
# spent 88µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@27 # spent 71µs making 1 call to Exporter::import
282836µs21.65ms
# spent 1.61ms (1.46+155µs) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@28 which was called: # once (1.46ms+155µs) by CGI::Compile::_eval at line 28
use C4::Review qw/numberofreviews/;
# spent 1.61ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@28 # spent 40µs making 1 call to Exporter::import
2921.09ms23.36ms
# spent 3.28ms (2.70+583µs) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@29 which was called: # once (2.70ms+583µs) by CGI::Compile::_eval at line 29
use C4::Suggestions qw/CountSuggestion/;
# spent 3.28ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@29 # spent 84µs making 1 call to Exporter::import
302881µs28.43ms
# spent 8.36ms (5.25+3.11) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@30 which was called: # once (5.25ms+3.11ms) by CGI::Compile::_eval at line 30
use C4::Tags qw/get_count_by_tag_status/;
# spent 8.36ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@30 # spent 68µs making 1 call to Exporter::import
312647µs11.94ms
# spent 1.94ms (1.71+234µs) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@31 which was called: # once (1.71ms+234µs) by CGI::Compile::_eval at line 31
use Koha::Borrower::Modifications;
322770µs17.47ms
# spent 7.47ms (6.58+894µs) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@32 which was called: # once (6.58ms+894µs) by CGI::Compile::_eval at line 32
use Koha::Borrower::Discharge;
33
3411.98ms12.36msmy $query = new CGI;
35
36114µs1264msmy ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
# spent 264ms making 1 call to C4::Auth::get_template_and_user
37 {
38 template_name => "intranet-main.tt",
39 query => $query,
40 type => "intranet",
41 authnotrequired => 0,
42 flagsrequired => { catalogue => 1, },
43 }
44);
45
461300nsmy $homebranch;
47117µs28µsif (C4::Context->userenv) {
# spent 8µs making 2 calls to C4::Context::userenv, avg 4µs/call
48 $homebranch = C4::Context->userenv->{'branch'};
49}
50120µs424.0msmy $all_koha_news = &GetNewsToDisplay("koha",$homebranch);
# spent 24.0ms making 1 call to C4::NewsChannels::GetNewsToDisplay # spent 7µs making 2 calls to DBI::common::DESTROY, avg 4µs/call # spent 3µs making 1 call to DBD::_mem::common::DESTROY
511700nsmy $koha_news_count = scalar @$all_koha_news;
52
5316µs114µs$template->param(
# spent 14µs making 1 call to C4::Templates::param
54 koha_news => $all_koha_news,
55 koha_news_count => $koha_news_count
56);
57
58112µs29.98msmy $branch =
# spent 9.98ms making 2 calls to C4::Context::preference, avg 4.99ms/call
59 ( C4::Context->preference("IndependentBranchesPatronModifications")
60 || C4::Context->preference("IndependentBranches") )
61 && !$flags->{'superlibrarian'}
62 ? C4::Context->userenv()->{'branch'}
63 : undef;
64
6516µs4296µsmy $pendingcomments = numberofreviews(0);
# spent 289µs making 1 call to C4::Review::numberofreviews # spent 5µs making 2 calls to DBI::common::DESTROY, avg 2µs/call # spent 2µs making 1 call to DBD::_mem::common::DESTROY
6615µs4194µsmy $pendingtags = get_count_by_tag_status(0);
# spent 190µs making 1 call to C4::Tags::get_count_by_tag_status # spent 3µs making 2 calls to DBI::common::DESTROY, avg 2µs/call # spent 1µs making 1 call to DBD::_mem::common::DESTROY
6714µs42.55msmy $pendingsuggestions = CountSuggestion("ASKED");
# spent 2.54ms making 1 call to C4::Suggestions::CountSuggestion # spent 5µs making 2 calls to DBI::common::DESTROY, avg 3µs/call # spent 2µs making 1 call to DBD::_mem::common::DESTROY
68111µs4267µsmy $pending_borrower_modifications =
# spent 262µs making 1 call to Koha::Borrower::Modifications::GetPendingModificationsCount # spent 4µs making 2 calls to DBI::common::DESTROY, avg 2µs/call # spent 1µs making 1 call to DBD::_mem::common::DESTROY
69 Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
70111µs17.31msmy $pending_discharge_requests = Koha::Borrower::Discharge::count({ pending => 1 });
# spent 7.31ms making 1 call to Koha::Borrower::Discharge::count
71
7217µs117µs$template->param(
# spent 17µs making 1 call to C4::Templates::param
73 pendingcomments => $pendingcomments,
74 pendingtags => $pendingtags,
75 pendingsuggestions => $pendingsuggestions,
76 pending_borrower_modifications => $pending_borrower_modifications,
77 pending_discharge_requests => $pending_discharge_requests,
78);
79
80#
81# warn user if he is using mysql/admin login
82#
831500nsunless ($loggedinuser) {
84 $template->param(adminWarning => 1);
85}
86
87151µs2169msoutput_html_with_http_headers $query, $cookie, $template->output;
# spent 167ms making 1 call to C4::Templates::output # spent 1.94ms making 1 call to C4::Output::output_html_with_http_headers
88
89};
9011µs my $self = shift;
91129µs28µs my $exit_val = unpack('C', pack('C', sprintf('%.0f', $rv)));
921300ns if ($@) {
93 die $@ unless (
94 ref($@) eq 'ARRAY' and
95 $@->[0] eq "EXIT\n"
96 );
97 my $exit_param = unpack('C', pack('C', sprintf('%.0f', $@->[1])));
98
99 if ($exit_param != 0 && !$CGI::Compile::RETURN_EXIT_VAL && !$self->{return_exit_val}) {
100 die "exited nonzero: $exit_param";
101 }
102
103 $exit_val = $exit_param;
104 }
105
1061181µs return $exit_val;
10717µs };
 
# spent 16µs within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:open which was called: # once (16µs+0s) by CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::__ANON__[/home/vagrant/kohaclone/mainpage.pl:107] at line 2 of (eval 163)[CGI/Compile.pm:12]
sub CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:open; # opcode
# spent 6µs within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:pack which was called: # once (6µs+0s) by CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::__ANON__[/home/vagrant/kohaclone/mainpage.pl:107] at line 91
sub CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:pack; # opcode
# spent 3µs within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:unpack which was called: # once (3µs+0s) by CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::__ANON__[/home/vagrant/kohaclone/mainpage.pl:107] at line 91
sub CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:unpack; # opcode