projects
/
Biblio-Isis
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added ignore_empty_subfields [0.24_1]
[Biblio-Isis]
/
scripts
/
bench.pl
diff --git
a/scripts/bench.pl
b/scripts/bench.pl
index
ae79854
..
dac926b
100755
(executable)
--- a/
scripts/bench.pl
+++ b/
scripts/bench.pl
@@
-3,7
+3,7
@@
use strict;
use blib;
use strict;
use blib;
-use
IsisDB
;
+use
Biblio::Isis
;
use OpenIsis;
use MARC::File::USMARC;
use OpenIsis;
use MARC::File::USMARC;
@@
-11,12
+11,12
@@
use Benchmark qw( timethese cmpthese ) ;
my $isisdb = shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI';
my $isisdb = shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI';
-my $isis =
IsisDB
->new (
+my $isis =
Biblio::Isis
->new (
isisdb => $isisdb,
debug => shift @ARGV,
);
isisdb => $isisdb,
debug => shift @ARGV,
);
-my $isis_filter =
IsisDB
->new (
+my $isis_filter =
Biblio::Isis
->new (
isisdb => $isisdb,
debug => shift @ARGV,
hash_filter => sub {
isisdb => $isisdb,
debug => shift @ARGV,
hash_filter => sub {
@@
-25,7
+25,7
@@
my $isis_filter = IsisDB->new (
}
);
}
);
-my $rows = $isis->
{'maxmfn'}
;
+my $rows = $isis->
count
;
my $db = OpenIsis::open( $isisdb );
my $db = OpenIsis::open( $isisdb );
@@
-34,13
+34,13
@@
print "rows: $rows\n\n";
my $mfn = 1;
my $r = timethese( -5, {
my $mfn = 1;
my $r = timethese( -5, {
- Isis
DB
=> sub {
+ Isis => sub {
$isis->fetch( $mfn++ % $rows + 1 );
},
$isis->fetch( $mfn++ % $rows + 1 );
},
- Isis
DB
_hash => sub {
+ Isis_hash => sub {
$isis->to_hash( $mfn++ % $rows + 1 );
},
$isis->to_hash( $mfn++ % $rows + 1 );
},
- Isis
DB
_hash_filter => sub {
+ Isis_hash_filter => sub {
$isis_filter->to_hash( $mfn++ % $rows + 1 );
},
$isis_filter->to_hash( $mfn++ % $rows + 1 );
},