← 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:33:30 2016

Filename/home/vagrant/kohaclone/mainpage.pl
StatementsExecuted 44 statements in 6.38ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1114.99ms9.00msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@30CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@30
1113.14ms3.85msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@29CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@29
1112.10ms2.37msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@31CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@31
1112.03ms2.80msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@32CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@32
1111.74ms1.96msCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@28CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@28
11137µs214µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@22CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@22
11126µs254µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@24CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@24
11124µs84µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@25CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@25
11121µs104µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@27CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@27
11121µs67µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@23CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@23
11119µs307µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::BEGIN@26CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@26
11110µs10µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::CORE:packCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:pack (opcode)
11110µs10µsCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::::CORE:openCGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:open (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
21511µs320µs
# spent 15µs making 1 call to Template::Provider::DESTROY # spent 4µs making 1 call to Template::Context::DESTROY # spent 900ns 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
222251µs2390µs
# spent 214µs (37+177) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@22 which was called: # once (37µs+177µs) by CGI::Compile::_eval at line 22
use Modern::Perl;
# spent 214µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@22 # spent 177µs making 1 call to Modern::Perl::import
23297µs2113µs
# spent 67µs (21+46) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@23 which was called: # once (21µs+46µs) by CGI::Compile::_eval at line 23
use CGI qw ( -utf8 );
# spent 67µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@23 # spent 46µs making 1 call to CGI::import
242289µs2481µs
# spent 254µs (26+227) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@24 which was called: # once (26µs+227µs) by CGI::Compile::_eval at line 24
use C4::Output;
# spent 254µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@24 # spent 227µs making 1 call to Exporter::import
252113µs2145µs
# spent 84µs (24+61) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@25 which was called: # once (24µs+61µs) by CGI::Compile::_eval at line 25
use C4::Auth;
# spent 84µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@25 # spent 61µs making 1 call to Exporter::import
262340µs2595µs
# spent 307µs (19+288) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@26 which was called: # once (19µs+288µs) by CGI::Compile::_eval at line 26
use C4::Koha;
# spent 307µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@26 # spent 288µs making 1 call to Exporter::import
272141µs2188µs
# spent 104µs (21+83) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@27 which was called: # once (21µs+83µs) by CGI::Compile::_eval at line 27
use C4::NewsChannels; # GetNewsToDisplay
# spent 104µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@27 # spent 83µs making 1 call to Exporter::import
282741µs22.01ms
# spent 1.96ms (1.74+220µs) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@28 which was called: # once (1.74ms+220µs) by CGI::Compile::_eval at line 28
use C4::Review qw/numberofreviews/;
# spent 1.96ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@28 # spent 43µs making 1 call to Exporter::import
292731µs23.97ms
# spent 3.85ms (3.14+709µs) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@29 which was called: # once (3.14ms+709µs) by CGI::Compile::_eval at line 29
use C4::Suggestions qw/CountSuggestion/;
# spent 3.85ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@29 # spent 122µs making 1 call to Exporter::import
302846µs29.08ms
# spent 9.00ms (4.99+4.00) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@30 which was called: # once (4.99ms+4.00ms) by CGI::Compile::_eval at line 30
use C4::Tags qw/get_count_by_tag_status/;
# spent 9.00ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@30 # spent 83µs making 1 call to Exporter::import
312741µs12.37ms
# spent 2.37ms (2.10+268µs) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@31 which was called: # once (2.10ms+268µs) by CGI::Compile::_eval at line 31
use Koha::Borrower::Modifications;
3221.03ms12.80ms
# spent 2.80ms (2.03+772µs) within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@32 which was called: # once (2.03ms+772µs) by CGI::Compile::_eval at line 32
use Koha::Borrower::Discharge;
33
341106µs1190µsmy $query = new CGI;
35
36116µs1255msmy ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
# spent 255ms 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
461100nsmy $homebranch;
47119µs29µsif (C4::Context->userenv) {
# spent 9µs making 2 calls to C4::Context::userenv, avg 5µs/call
48 $homebranch = C4::Context->userenv->{'branch'};
49}
50119µs426.6msmy $all_koha_news = &GetNewsToDisplay("koha",$homebranch);
# spent 26.6ms making 1 call to C4::NewsChannels::GetNewsToDisplay # spent 10µs making 2 calls to DBI::common::DESTROY, avg 5µs/call # spent 4µs making 1 call to DBD::_mem::common::DESTROY
511600nsmy $koha_news_count = scalar @$all_koha_news;
52
5316µs112µs$template->param(
# spent 12µs making 1 call to C4::Templates::param
54 koha_news => $all_koha_news,
55 koha_news_count => $koha_news_count
56);
57
58113µs211.0msmy $branch =
# spent 11.0ms making 2 calls to C4::Context::preference, avg 5.49ms/call
59 ( C4::Context->preference("IndependentBranchesPatronModifications")
60 || C4::Context->preference("IndependentBranches") )
61 && !$flags->{'superlibrarian'}
62 ? C4::Context->userenv()->{'branch'}
63 : undef;
64
6516µs4334µsmy $pendingcomments = numberofreviews(0);
# spent 326µs making 1 call to C4::Review::numberofreviews # spent 6µs making 2 calls to DBI::common::DESTROY, avg 3µs/call # spent 2µs making 1 call to DBD::_mem::common::DESTROY
6614µs4212µsmy $pendingtags = get_count_by_tag_status(0);
# spent 207µs making 1 call to C4::Tags::get_count_by_tag_status # 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
6714µs43.03msmy $pendingsuggestions = CountSuggestion("ASKED");
# spent 3.02ms making 1 call to C4::Suggestions::CountSuggestion # spent 6µs making 2 calls to DBI::common::DESTROY, avg 3µs/call # spent 2µs making 1 call to DBD::_mem::common::DESTROY
68110µs4300µsmy $pending_borrower_modifications =
# spent 295µ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 );
70112µs13.31msmy $pending_discharge_requests = Koha::Borrower::Discharge::count({ pending => 1 });
# spent 3.31ms making 1 call to Koha::Borrower::Discharge::count
71
7217µs118µs$template->param(
# spent 18µ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#
831400nsunless ($loggedinuser) {
84 $template->param(adminWarning => 1);
85}
86
87199µs2132msoutput_html_with_http_headers $query, $cookie, $template->output;
# spent 131ms making 1 call to C4::Templates::output # spent 792µs making 1 call to C4::Output::output_html_with_http_headers
88
89};
9011µs my $self = shift;
91134µs213µs my $exit_val = unpack('C', pack('C', sprintf('%.0f', $rv)));
921500ns 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
1061189µs return $exit_val;
10719µs };
 
# spent 10µs within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:open which was called: # once (10µs+0s) by CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::__ANON__[/home/vagrant/kohaclone/mainpage.pl:107] at line 2 of (eval 1230)[CGI/Compile.pm:12]
sub CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:open; # opcode
# spent 10µs within CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:pack which was called: # once (10µ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