Filename | /home/vagrant/kohaclone/plack.pl |
Statements | Executed 4018 statements in 71.7ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 2.93ms | 23.8ms | BEGIN@5 | CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::
1 | 1 | 1 | 31µs | 160µs | BEGIN@3 | CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::
1 | 1 | 1 | 18µs | 18µs | CORE:open (opcode) | CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::
1 | 1 | 1 | 17µs | 62µs | BEGIN@4 | CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::
1 | 1 | 1 | 17µs | 17µs | BEGIN@6 | CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::
2 | 2 | 1 | 9µs | 9µs | CORE:print (opcode) | CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::
1 | 1 | 1 | 5µs | 5µs | CORE:pack (opcode) | CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::
1 | 1 | 1 | 4µs | 4µs | CORE:unpack (opcode) | CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::
0 | 0 | 0 | 0s | 0s | __ANON__[:43] | CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||
2 | 1 | 2µs | |||
3 | 2 | 191µs | 2 | 289µs | # spent 160µs (31+129) within CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::BEGIN@3 which was called:
# once (31µs+129µs) by CGI::Compile::_eval at line 3 # spent 160µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::BEGIN@3
# spent 129µs making 1 call to Modern::Perl::import |
4 | 2 | 87µs | 2 | 106µs | # spent 62µs (17+44) within CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::BEGIN@4 which was called:
# once (17µs+44µs) by CGI::Compile::_eval at line 4 # spent 62µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::BEGIN@4
# spent 44µs making 1 call to CGI::import |
5 | 2 | 1.25ms | 2 | 24.0ms | # spent 23.8ms (2.93+20.9) within CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::BEGIN@5 which was called:
# once (2.93ms+20.9ms) by CGI::Compile::_eval at line 5 # spent 23.8ms making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::BEGIN@5
# spent 147µs making 1 call to Exporter::import |
6 | 2 | 240µs | 1 | 17µs | # spent 17µs within CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::BEGIN@6 which was called:
# once (17µs+0s) by CGI::Compile::_eval at line 6 # spent 17µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::BEGIN@6 |
7 | 1 | 2µs | for ( 1 .. 1000 ) { | ||
8 | 1000 | 1.34ms | for my $l (qw(CPL MPL IPT )) { | ||
9 | 3000 | 64.1ms | 6000 | 13.6s | Koha::Libraries->find($l)->branchname; # spent 13.4s making 3000 calls to Koha::Objects::find, avg 4.48ms/call
# spent 146ms making 3000 calls to Koha::Object::AUTOLOAD, avg 49µs/call |
10 | } | ||||
11 | } | ||||
12 | |||||
13 | 1 | 3.08ms | 1 | 3.75ms | my $query = CGI->new; # spent 3.75ms making 1 call to Plack::Sandbox::_2fetc_2fkoha_2fsites_2fkohadev_2fplack_2epsgi::__ANON__ |
14 | 1 | 1.09ms | 2 | 1.08ms | print $query->header({ # spent 1.07ms making 1 call to CGI::AUTOLOAD
# spent 8µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::CORE:print |
15 | type => 'text/html', | ||||
16 | status => '200 OK', | ||||
17 | charset => 'UTF-8', | ||||
18 | Pragma => 'no-cache', | ||||
19 | }); | ||||
20 | 1 | 19µs | 1 | 1µs | print "<html><body>Hello</body></html>"; # spent 1µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::CORE:print |
21 | |||||
22 | #my $cookie = undef; | ||||
23 | #output_html_with_http_headers $query, $cookie, "<html><body>Hello</body></html>"; | ||||
24 | |||||
25 | }; | ||||
26 | 1 | 1µs | my $self = shift; | ||
27 | 1 | 29µs | 2 | 9µs | my $exit_val = unpack('C', pack('C', sprintf('%.0f', $rv))); # spent 5µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::CORE:pack
# spent 4µs making 1 call to CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::CORE:unpack |
28 | 1 | 500ns | if ($@) { | ||
29 | die $@ unless ( | ||||
30 | ref($@) eq 'ARRAY' and | ||||
31 | $@->[0] eq "EXIT\n" | ||||
32 | ); | ||||
33 | my $exit_param = unpack('C', pack('C', sprintf('%.0f', $@->[1]))); | ||||
34 | |||||
35 | if ($exit_param != 0 && !$CGI::Compile::RETURN_EXIT_VAL && !$self->{return_exit_val}) { | ||||
36 | die "exited nonzero: $exit_param"; | ||||
37 | } | ||||
38 | |||||
39 | $exit_val = $exit_param; | ||||
40 | } | ||||
41 | |||||
42 | 1 | 273µs | return $exit_val; | ||
43 | 1 | 5µs | }; | ||
# spent 18µs within CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::CORE:open which was called:
# once (18µs+0s) by CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::__ANON__[/home/vagrant/kohaclone/plack.pl:43] at line 2 of (eval 163)[CGI/Compile.pm:12] | |||||
# spent 5µs within CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::CORE:pack which was called:
# once (5µs+0s) by CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::__ANON__[/home/vagrant/kohaclone/plack.pl:43] at line 27 | |||||
# spent 9µs within CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::CORE:print which was called 2 times, avg 5µs/call:
# once (8µs+0s) by CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::__ANON__[/home/vagrant/kohaclone/plack.pl:43] at line 14
# once (1µs+0s) by CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::__ANON__[/home/vagrant/kohaclone/plack.pl:43] at line 20 | |||||
# spent 4µs within CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::CORE:unpack which was called:
# once (4µs+0s) by CGI::Compile::ROOT::home_vagrant_kohaclone_plack_2epl::__ANON__[/home/vagrant/kohaclone/plack.pl:43] at line 27 |