← Index
NYTProf Performance Profile   « line view »
For svc/members/upsert
  Run on Tue Jan 13 11:50:22 2015
Reported on Tue Jan 13 12:09:49 2015

Filename/mnt/catalyst/koha/C4/ClassSortRoutine/LCC.pm
StatementsExecuted 18 statements in 2.06ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1113.38ms28.1msC4::ClassSortRoutine::LCC::::BEGIN@23C4::ClassSortRoutine::LCC::BEGIN@23
111547µs559µsC4::ClassSortRoutine::LCC::::BEGIN@21C4::ClassSortRoutine::LCC::BEGIN@21
11115µs92µsC4::ClassSortRoutine::LCC::::get_class_sort_keyC4::ClassSortRoutine::LCC::get_class_sort_key
1119µs30µsC4::ClassSortRoutine::LCC::::BEGIN@25C4::ClassSortRoutine::LCC::BEGIN@25
1118µs12µsC4::ClassSortRoutine::LCC::::BEGIN@22C4::ClassSortRoutine::LCC::BEGIN@22
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package C4::ClassSortRoutine::LCC;
2
3# Copyright (C) 2007 LibLime
4# Copyright (C) 2012 Equinox Software, Inc.
5#
6# This file is part of Koha.
7#
8# Koha is free software; you can redistribute it and/or modify it under the
9# terms of the GNU General Public License as published by the Free Software
10# Foundation; either version 2 of the License, or (at your option) any later
11# version.
12#
13# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License along
18# with Koha; if not, write to the Free Software Foundation, Inc.,
19# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
21229µs2572µs
# spent 559µs (547+13) within C4::ClassSortRoutine::LCC::BEGIN@21 which was called: # once (547µs+13µs) by C4::ClassSource::BEGIN@25 at line 21
use strict;
# spent 559µs making 1 call to C4::ClassSortRoutine::LCC::BEGIN@21 # spent 12µs making 1 call to strict::import
22221µs217µs
# spent 12µs (8+5) within C4::ClassSortRoutine::LCC::BEGIN@22 which was called: # once (8µs+5µs) by C4::ClassSource::BEGIN@25 at line 22
use warnings;
# spent 12µs making 1 call to C4::ClassSortRoutine::LCC::BEGIN@22 # spent 5µs making 1 call to warnings::import
2321.61ms128.1ms
# spent 28.1ms (3.38+24.7) within C4::ClassSortRoutine::LCC::BEGIN@23 which was called: # once (3.38ms+24.7ms) by C4::ClassSource::BEGIN@25 at line 23
use Library::CallNumber::LC;
# spent 28.1ms making 1 call to C4::ClassSortRoutine::LCC::BEGIN@23
24
252382µs251µs
# spent 30µs (9+21) within C4::ClassSortRoutine::LCC::BEGIN@25 which was called: # once (9µs+21µs) by C4::ClassSource::BEGIN@25 at line 25
use vars qw($VERSION);
# spent 30µs making 1 call to C4::ClassSortRoutine::LCC::BEGIN@25 # spent 21µs making 1 call to vars::import
26
27# set the version for version checking
2812µs$VERSION = 3.07.00.049;
29
30=head1 NAME
31
32C4::ClassSortRoutine::LCC - generic call number sorting key routine
33
34=head1 SYNOPSIS
35
36use C4::ClassSortRoutine;
37
38my $cn_sort = GetClassSortKey('LCC', $cn_class, $cn_item);
39
40=head1 FUNCTIONS
41
42=head2 get_class_sort_key
43
44 my $cn_sort = C4::ClassSortRoutine::LCC::LCC($cn_class, $cn_item);
45
46Generates sorting key for LC call numbers.
47
48=cut
49
50
# spent 92µs (15+77) within C4::ClassSortRoutine::LCC::get_class_sort_key which was called: # once (15µs+77µs) by C4::ClassSource::BEGIN@25 at line 1 of (eval 43)[C4/ClassSortRoutine.pm:58]
sub get_class_sort_key {
511600ns my ($cn_class, $cn_item) = @_;
52
531200ns $cn_class = '' unless defined $cn_class;
5410s $cn_item = '' unless defined $cn_item;
5513µs15µs my $call_number = Library::CallNumber::LC->new(uc "$cn_class $cn_item");
# spent 5µs making 1 call to Library::CallNumber::LC::new
561100ns return '' unless defined $call_number;
5711µs172µs my $key = $call_number->normalize();
# spent 72µs making 1 call to Library::CallNumber::LC::normalize
581100ns $key = '' unless defined $key;
5917µs return $key;
60
61}
62
6313µs1;
64
65=head1 AUTHOR
66
67Koha Development Team <http://koha-community.org/>
68
69=cut
70