| Filename | /home/vagrant/kohaclone/mainpage.pl |
| Statements | Executed 44 statements in 6.38ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 4.99ms | 9.00ms | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@30 |
| 1 | 1 | 1 | 3.14ms | 3.85ms | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@29 |
| 1 | 1 | 1 | 2.10ms | 2.37ms | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@31 |
| 1 | 1 | 1 | 2.03ms | 2.80ms | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@32 |
| 1 | 1 | 1 | 1.74ms | 1.96ms | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@28 |
| 1 | 1 | 1 | 37µs | 214µs | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@22 |
| 1 | 1 | 1 | 26µs | 254µs | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@24 |
| 1 | 1 | 1 | 24µs | 84µs | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@25 |
| 1 | 1 | 1 | 21µs | 104µs | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@27 |
| 1 | 1 | 1 | 21µs | 67µs | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@23 |
| 1 | 1 | 1 | 19µs | 307µs | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@26 |
| 1 | 1 | 1 | 10µs | 10µs | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:pack (opcode) |
| 1 | 1 | 1 | 10µs | 10µs | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:open (opcode) |
| 1 | 1 | 1 | 3µs | 3µs | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:unpack (opcode) |
| 0 | 0 | 0 | 0s | 0s | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::__ANON__[:107] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | #!/usr/bin/perl | ||||
| 2 | 1 | 511µs | 3 | 20µ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 | |||||
| 22 | 2 | 251µs | 2 | 390µ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 # 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 |
| 23 | 2 | 97µs | 2 | 113µ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 # 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 |
| 24 | 2 | 289µs | 2 | 481µ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 # 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 |
| 25 | 2 | 113µs | 2 | 145µ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 # 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 |
| 26 | 2 | 340µs | 2 | 595µ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 # 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 |
| 27 | 2 | 141µs | 2 | 188µ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 # 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 |
| 28 | 2 | 741µs | 2 | 2.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 # 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 |
| 29 | 2 | 731µs | 2 | 3.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 # 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 |
| 30 | 2 | 846µs | 2 | 9.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 # 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 |
| 31 | 2 | 741µs | 1 | 2.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 # spent 2.37ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@31 |
| 32 | 2 | 1.03ms | 1 | 2.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 # spent 2.80ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@32 |
| 33 | |||||
| 34 | 1 | 106µs | 1 | 190µs | my $query = new CGI; # spent 190µs making 1 call to Plack::Sandbox::_2fetc_2fkoha_2fsites_2fkohadev_2fplack_2epsgi::__ANON__ |
| 35 | |||||
| 36 | 1 | 16µs | 1 | 255ms | my ( $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 | |||||
| 46 | 1 | 100ns | my $homebranch; | ||
| 47 | 1 | 19µs | 2 | 9µs | if (C4::Context->userenv) { # spent 9µs making 2 calls to C4::Context::userenv, avg 5µs/call |
| 48 | $homebranch = C4::Context->userenv->{'branch'}; | ||||
| 49 | } | ||||
| 50 | 1 | 19µs | 4 | 26.6ms | my $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 |
| 51 | 1 | 600ns | my $koha_news_count = scalar @$all_koha_news; | ||
| 52 | |||||
| 53 | 1 | 6µs | 1 | 12µ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 | |||||
| 58 | 1 | 13µs | 2 | 11.0ms | my $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 | |||||
| 65 | 1 | 6µs | 4 | 334µs | my $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 |
| 66 | 1 | 4µs | 4 | 212µs | my $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 |
| 67 | 1 | 4µs | 4 | 3.03ms | my $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 |
| 68 | 1 | 10µs | 4 | 300µs | my $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 ); | ||||
| 70 | 1 | 12µs | 1 | 3.31ms | my $pending_discharge_requests = Koha::Borrower::Discharge::count({ pending => 1 }); # spent 3.31ms making 1 call to Koha::Borrower::Discharge::count |
| 71 | |||||
| 72 | 1 | 7µs | 1 | 18µ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 | # | ||||
| 83 | 1 | 400ns | unless ($loggedinuser) { | ||
| 84 | $template->param(adminWarning => 1); | ||||
| 85 | } | ||||
| 86 | |||||
| 87 | 1 | 99µs | 2 | 132ms | output_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 | }; | ||||
| 90 | 1 | 1µs | my $self = shift; | ||
| 91 | 1 | 34µs | 2 | 13µs | my $exit_val = unpack('C', pack('C', sprintf('%.0f', $rv))); # spent 10µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:pack
# spent 3µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::CORE:unpack |
| 92 | 1 | 500ns | 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 | |||||
| 106 | 1 | 189µs | return $exit_val; | ||
| 107 | 1 | 9µ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] | |||||
# 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 | |||||
# 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 |