/[Biblio-Isis]/trunk/scripts/bench.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/scripts/bench.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (show annotations)
Wed Dec 29 15:10:34 2004 UTC (19 years, 3 months ago) by dpavlin
File MIME type: text/plain
File size: 550 byte(s)
added benchmarking script, some speedup (7029.54/s vs 5829.19/s),
removed left-overs from php porting (dictionaries are not supported by this module),
make dump_isis.pl arguments same as dump_openisis.pl,
renamed GetMFN to fetch

1 #!/usr/bin/perl -w
2
3 use strict;
4 use blib;
5
6 use IsisDB;
7 use OpenIsis;
8 use MARC::File::USMARC;
9
10 use Benchmark qw( timethese cmpthese ) ;
11
12 my $isisdb = shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI';
13
14 my $isis = IsisDB->new (
15 isisdb => $isisdb,
16 debug => shift @ARGV,
17 );
18
19 my $rows = $isis->{'maxmfn'};
20
21 my $db = OpenIsis::open( $isisdb );
22
23 print "rows: $rows\n\n";
24
25 my $mfn = 1;
26
27 my $r = timethese( -5, {
28 IsisDB => sub {
29 $isis->fetch( $mfn++ % $rows + 1 );
30 },
31 OpenIsis => sub {
32 OpenIsis::read( $db, $mfn++ % $rows + 1 );
33 },
34 } );
35 cmpthese $r;
36

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26