Filename | /home/vagrant/kohaclone/mainpage.pl |
Statements | Executed 44 statements in 9.81ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 9.94ms | 1.62s | BEGIN@25 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 6.58ms | 7.47ms | BEGIN@32 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 5.25ms | 8.36ms | BEGIN@30 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 2.70ms | 3.28ms | BEGIN@29 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 1.87ms | 24.4ms | BEGIN@24 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 1.71ms | 1.94ms | BEGIN@31 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 1.46ms | 1.61ms | BEGIN@28 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 25µs | 145µs | BEGIN@22 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 22µs | 278µs | BEGIN@26 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 18µs | 88µs | BEGIN@27 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 16µs | 68µs | BEGIN@23 | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 16µs | 16µs | CORE:open (opcode) | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 6µs | 6µs | CORE:pack (opcode) | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
1 | 1 | 1 | 3µs | 3µs | CORE:unpack (opcode) | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
0 | 0 | 0 | 0s | 0s | __ANON__[:107] | CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||
2 | 1 | 585µs | 3 | 21µ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 | |||||
22 | 2 | 176µs | 2 | 265µ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 # 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 |
23 | 2 | 95µs | 2 | 120µ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 # 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 |
24 | 2 | 1.12ms | 2 | 24.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 # 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 |
25 | 2 | 832µs | 2 | 1.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 # 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 |
26 | 2 | 304µs | 2 | 535µ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 # 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 |
27 | 2 | 116µs | 2 | 159µ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 # 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 |
28 | 2 | 836µs | 2 | 1.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 # 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 |
29 | 2 | 1.09ms | 2 | 3.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 # 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 |
30 | 2 | 881µs | 2 | 8.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 # 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 |
31 | 2 | 647µs | 1 | 1.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 # spent 1.94ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@31 |
32 | 2 | 770µs | 1 | 7.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 # spent 7.47ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_mainpage_2epl::BEGIN@32 |
33 | |||||
34 | 1 | 1.98ms | 1 | 2.36ms | my $query = new CGI; # spent 2.36ms making 1 call to Plack::Sandbox::_2fetc_2fkoha_2fsites_2fkohadev_2fplack_2epsgi::__ANON__ |
35 | |||||
36 | 1 | 14µs | 1 | 264ms | my ( $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 | |||||
46 | 1 | 300ns | my $homebranch; | ||
47 | 1 | 17µs | 2 | 8µs | if (C4::Context->userenv) { # spent 8µs making 2 calls to C4::Context::userenv, avg 4µs/call |
48 | $homebranch = C4::Context->userenv->{'branch'}; | ||||
49 | } | ||||
50 | 1 | 20µs | 4 | 24.0ms | my $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 |
51 | 1 | 700ns | my $koha_news_count = scalar @$all_koha_news; | ||
52 | |||||
53 | 1 | 6µs | 1 | 14µ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 | |||||
58 | 1 | 12µs | 2 | 9.98ms | my $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 | |||||
65 | 1 | 6µs | 4 | 296µs | my $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 |
66 | 1 | 5µs | 4 | 194µs | my $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 |
67 | 1 | 4µs | 4 | 2.55ms | my $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 |
68 | 1 | 11µs | 4 | 267µs | my $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 ); | ||||
70 | 1 | 11µs | 1 | 7.31ms | my $pending_discharge_requests = Koha::Borrower::Discharge::count({ pending => 1 }); # spent 7.31ms making 1 call to Koha::Borrower::Discharge::count |
71 | |||||
72 | 1 | 7µs | 1 | 17µ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 | # | ||||
83 | 1 | 500ns | unless ($loggedinuser) { | ||
84 | $template->param(adminWarning => 1); | ||||
85 | } | ||||
86 | |||||
87 | 1 | 51µs | 2 | 169ms | output_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 | }; | ||||
90 | 1 | 1µs | my $self = shift; | ||
91 | 1 | 29µs | 2 | 8µs | my $exit_val = unpack('C', pack('C', sprintf('%.0f', $rv))); # spent 6µ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 | 300ns | 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 | 181µs | return $exit_val; | ||
107 | 1 | 7µ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] | |||||
# 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 | |||||
# 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 |