Filename | /usr/share/koha/lib/C4/ClassSortRoutine/Generic.pm |
Statements | Executed 20 statements in 309µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
4 | 4 | 1 | 28µs | 226µs | CORE:subst (opcode) | C4::ClassSortRoutine::Generic::
1 | 1 | 1 | 27µs | 36µs | BEGIN@20 | C4::ClassSortRoutine::Generic::
1 | 1 | 1 | 25µs | 252µs | get_class_sort_key | C4::ClassSortRoutine::Generic::
1 | 1 | 1 | 13µs | 52µs | BEGIN@23 | C4::ClassSortRoutine::Generic::
1 | 1 | 1 | 13µs | 37µs | BEGIN@21 | C4::ClassSortRoutine::Generic::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package C4::ClassSortRoutine::Generic; | ||||
2 | |||||
3 | # Copyright (C) 2007 LibLime | ||||
4 | # | ||||
5 | # This file is part of Koha. | ||||
6 | # | ||||
7 | # Koha is free software; you can redistribute it and/or modify it under the | ||||
8 | # terms of the GNU General Public License as published by the Free Software | ||||
9 | # Foundation; either version 2 of the License, or (at your option) any later | ||||
10 | # version. | ||||
11 | # | ||||
12 | # Koha is distributed in the hope that it will be useful, but WITHOUT ANY | ||||
13 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||||
14 | # A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||||
15 | # | ||||
16 | # You should have received a copy of the GNU General Public License along | ||||
17 | # with Koha; if not, write to the Free Software Foundation, Inc., | ||||
18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||||
19 | |||||
20 | 3 | 34µs | 2 | 45µs | # spent 36µs (27+9) within C4::ClassSortRoutine::Generic::BEGIN@20 which was called:
# once (27µs+9µs) by C4::ClassSource::BEGIN@25 at line 20 # spent 36µs making 1 call to C4::ClassSortRoutine::Generic::BEGIN@20
# spent 9µs making 1 call to strict::import |
21 | 3 | 37µs | 2 | 61µs | # spent 37µs (13+24) within C4::ClassSortRoutine::Generic::BEGIN@21 which was called:
# once (13µs+24µs) by C4::ClassSource::BEGIN@25 at line 21 # spent 37µs making 1 call to C4::ClassSortRoutine::Generic::BEGIN@21
# spent 24µs making 1 call to warnings::import |
22 | |||||
23 | 3 | 184µs | 2 | 92µs | # spent 52µs (13+39) within C4::ClassSortRoutine::Generic::BEGIN@23 which was called:
# once (13µs+39µs) by C4::ClassSource::BEGIN@25 at line 23 # spent 52µs making 1 call to C4::ClassSortRoutine::Generic::BEGIN@23
# spent 39µs making 1 call to vars::import |
24 | |||||
25 | # set the version for version checking | ||||
26 | 1 | 1µs | $VERSION = 3.07.00.049; | ||
27 | |||||
28 | =head1 NAME | ||||
29 | |||||
- - | |||||
53 | # spent 252µs (25+226) within C4::ClassSortRoutine::Generic::get_class_sort_key which was called:
# once (25µs+226µs) by C4::ClassSource::BEGIN@25 at line 1 of (eval 1018)[/usr/share/koha/lib/C4/ClassSortRoutine.pm:58] | ||||
54 | 1 | 1µs | my ($cn_class, $cn_item) = @_; | ||
55 | |||||
56 | 1 | 600ns | $cn_class = '' unless defined $cn_class; | ||
57 | 1 | 200ns | $cn_item = '' unless defined $cn_item; | ||
58 | 1 | 2µs | my $key = uc "$cn_class $cn_item"; | ||
59 | 1 | 13µs | 1 | 3µs | $key =~ s/^\s+//; # spent 3µs making 1 call to C4::ClassSortRoutine::Generic::CORE:subst |
60 | 1 | 5µs | 1 | 2µs | $key =~ s/\s+$//; # spent 2µs making 1 call to C4::ClassSortRoutine::Generic::CORE:subst |
61 | 1 | 4µs | 1 | 1µs | $key =~ s/\s+/_/g; # spent 1µs making 1 call to C4::ClassSortRoutine::Generic::CORE:subst |
62 | 1 | 18µs | 2 | 418µs | $key =~ s/[^\p{IsAlnum}_]//g; # spent 220µs making 1 call to C4::ClassSortRoutine::Generic::CORE:subst
# spent 198µs making 1 call to utf8::SWASHNEW |
63 | 1 | 5µs | return $key; | ||
64 | |||||
65 | } | ||||
66 | |||||
67 | 1 | 3µs | 1; | ||
68 | |||||
69 | =head1 AUTHOR | ||||
70 | |||||
- - | |||||
# spent 226µs (28+198) within C4::ClassSortRoutine::Generic::CORE:subst which was called 4 times, avg 57µs/call:
# once (21µs+198µs) by C4::ClassSortRoutine::Generic::get_class_sort_key at line 62
# once (3µs+0s) by C4::ClassSortRoutine::Generic::get_class_sort_key at line 59
# once (2µs+0s) by C4::ClassSortRoutine::Generic::get_class_sort_key at line 60
# once (1µs+0s) by C4::ClassSortRoutine::Generic::get_class_sort_key at line 61 |