3 |
use strict; |
use strict; |
4 |
use blib; |
use blib; |
5 |
|
|
6 |
use IsisDB; |
use Biblio::Isis; |
7 |
use OpenIsis; |
use OpenIsis; |
8 |
use MARC::File::USMARC; |
use MARC::File::USMARC; |
9 |
|
|
11 |
|
|
12 |
my $isisdb = shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI'; |
my $isisdb = shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI'; |
13 |
|
|
14 |
my $isis = IsisDB->new ( |
my $isis = Biblio::Isis->new ( |
15 |
isisdb => $isisdb, |
isisdb => $isisdb, |
16 |
debug => shift @ARGV, |
debug => shift @ARGV, |
17 |
); |
); |
18 |
|
|
19 |
my $isis_filter = IsisDB->new ( |
my $isis_filter = Biblio::Isis->new ( |
20 |
isisdb => $isisdb, |
isisdb => $isisdb, |
21 |
debug => shift @ARGV, |
debug => shift @ARGV, |
22 |
hash_filter => sub { |
hash_filter => sub { |
34 |
my $mfn = 1; |
my $mfn = 1; |
35 |
|
|
36 |
my $r = timethese( -5, { |
my $r = timethese( -5, { |
37 |
IsisDB => sub { |
Isis => sub { |
38 |
$isis->fetch( $mfn++ % $rows + 1 ); |
$isis->fetch( $mfn++ % $rows + 1 ); |
39 |
}, |
}, |
40 |
IsisDB_hash => sub { |
Isis_hash => sub { |
41 |
$isis->to_hash( $mfn++ % $rows + 1 ); |
$isis->to_hash( $mfn++ % $rows + 1 ); |
42 |
}, |
}, |
43 |
IsisDB_hash_filter => sub { |
Isis_hash_filter => sub { |
44 |
$isis_filter->to_hash( $mfn++ % $rows + 1 ); |
$isis_filter->to_hash( $mfn++ % $rows + 1 ); |
45 |
}, |
}, |
46 |
|
|