[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/marc/benchmarks benchmarkschema,1.3,1.4 generateran
From: |
Steve Tonnesen |
Subject: |
[Koha-cvs] CVS: koha/marc/benchmarks benchmarkschema,1.3,1.4 generaterandomdata,1.1,1.2 getdata-paul,1.1,1.2 getdata-paul-regex,1.1,1.2 getdata-steve,1.1,1.2 runbenchmark,1.1,1.2 |
Date: |
Thu, 30 May 2002 12:55:21 -0700 |
Update of /cvsroot/koha/koha/marc/benchmarks
In directory usw-pr-cvs1:/tmp/cvs-serv25466
Modified Files:
benchmarkschema generaterandomdata getdata-paul
getdata-paul-regex getdata-steve runbenchmark
Log Message:
New benchmark run to test Sergey's schema
Index: benchmarkschema
===================================================================
RCS file: /cvsroot/koha/koha/marc/benchmarks/benchmarkschema,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** benchmarkschema 29 May 2002 22:11:20 -0000 1.3
--- benchmarkschema 30 May 2002 19:55:18 -0000 1.4
***************
*** 5,12 ****
bibid bigint(20) NOT NULL default '0',
subfieldorder tinyint(4) NOT NULL default '0',
! subfieldmark char(1) NOT NULL default '',
subfieldvalue varchar(255) default NULL,
valuebloblink bigint(20) default NULL,
PRIMARY KEY (subfieldid),
! KEY (bibid,tagid,tag,subfieldmark),
) TYPE=MyISAM;
--- 5,36 ----
bibid bigint(20) NOT NULL default '0',
subfieldorder tinyint(4) NOT NULL default '0',
! subfieldcode char(1) NOT NULL default '',
subfieldvalue varchar(255) default NULL,
valuebloblink bigint(20) default NULL,
PRIMARY KEY (subfieldid),
! KEY (bibid,tagid,tag,subfieldcode),
! KEY (bibid,tag,subfieldcode,subfieldvalue)
) TYPE=MyISAM;
+
+
+ CREATE TABLE marc_field_table_sergey (
+ fieldid bigint(20) unsigned NOT NULL auto_increment,
+ bibid bigint(20) NOT NULL default '0',
+ tagid bigint(20) NOT NULL default '0',
+ tag char(3) NOT NULL default '',
+ PRIMARY KEY (fieldid),
+ KEY (bibid),
+ KEY (tagid),
+ KEY (tag)
+ );
+
+ CREATE TABLE marc_subfield_table_sergey (
+ subfieldid bigint(20) unsigned NOT NULL auto_increment,
+ fieldid bigint(20),
+ subfieldorder tinyint(4) NOT NULL default '0',
+ subfieldcode char(1) NOT NULL default '',
+ subfieldvalue varchar(255) default NULL,
+ valuebloblink bigint(20) default NULL,
+ PRIMARY KEY (subfieldid),
+ KEY (fieldid)
+ );
Index: generaterandomdata
===================================================================
RCS file: /cvsroot/koha/koha/marc/benchmarks/generaterandomdata,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** generaterandomdata 17 May 2002 22:03:15 -0000 1.1
--- generaterandomdata 30 May 2002 19:55:18 -0000 1.2
***************
*** 32,36 ****
my $subfieldsused;
my $localsubfieldcounter=0;
- my $tagvalue='';
for ($j=1; $j<=$numsubfields; $j++) {
my $code='';
--- 32,35 ----
***************
*** 45,50 ****
$localsubfieldcounter++;
my $word=$words[int(rand($#words))];
! $tagvalue.="\$$code $word\0";
! my $sth=$dbh->prepare("insert into marc_2XX_subfield_table
(subfieldid, tagid, tag, bibid, subfieldorder, subfieldcode, subfieldvalue)
values (?,?,?,?,?,?,?)");
my $error=1;
while ($error) {
--- 44,48 ----
$localsubfieldcounter++;
my $word=$words[int(rand($#words))];
! my $sth=$dbh->prepare("insert into marc_subfield_table (subfieldid,
tagid, tag, bibid, subfieldorder, subfieldcode, subfieldvalue) values
(?,?,?,?,?,?,?)");
my $error=1;
while ($error) {
***************
*** 57,72 ****
$sth->finish;
}
! }
! $tagvalue=~s/\0$//;
! my $error=1;
! my $sth=$dbh->prepare("insert into marc_0XX_tag_table (bibcode,
tagnumber, tagorder, tagvalue) values (?, ?, ?, ?)");
! while ($error) {
! $sth->execute($bibid, $tag, $localtagcounter, $tagvalue);
! $error=$dbh->err;
! if ($error) {
! sleep 1;
! print "ERROR: $error\n";
}
- $sth->finish;
}
}
--- 55,81 ----
$sth->finish;
}
! my $error=1;
! my $sth=$dbh->prepare("insert into marc_field_table_sergey (bibid,
tagid, tag) values (?, ?, ?)");
! while ($error) {
! $sth->execute($bibid, $localtagcounter, $tag);
! $error=$dbh->err;
! if ($error) {
! sleep 1;
! print "ERROR: $error\n";
! }
! $fieldid=$dbh->{'mysql_insertid'};
! $sth->finish;
! }
! $error=1;
! $sth=$dbh->prepare("insert into marc_subfield_table_sergey
(fieldid, subfieldorder, subfieldcode, subfieldvalue) values (?, ?, ?, ?)");
! while ($error) {
! $sth->execute($fieldid, $localsubfieldcounter, $code, $word);
! $error=$dbh->err;
! if ($error) {
! sleep 1;
! print "ERROR: $error\n";
! }
! $sth->finish;
}
}
}
Index: getdata-paul
===================================================================
RCS file: /cvsroot/koha/koha/marc/benchmarks/getdata-paul,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** getdata-paul 17 May 2002 22:03:15 -0000 1.1
--- getdata-paul 30 May 2002 19:55:19 -0000 1.2
***************
*** 8,12 ****
! my $dbh=DBI->connect("dbi:mysql:kohabenchmark", 'root', 'testpass');
my $count=$ARGV[0];
--- 8,12 ----
! my $dbh=DBI->connect("dbi:mysql:kohabenchmark", 'youruserid', 'yourpassword');
my $count=$ARGV[0];
Index: getdata-paul-regex
===================================================================
RCS file: /cvsroot/koha/koha/marc/benchmarks/getdata-paul-regex,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** getdata-paul-regex 17 May 2002 22:03:15 -0000 1.1
--- getdata-paul-regex 30 May 2002 19:55:19 -0000 1.2
***************
*** 8,12 ****
! my $dbh=DBI->connect("dbi:mysql:kohabenchmark", 'root', 'testpass');
my $count=$ARGV[0];
--- 8,12 ----
! my $dbh=DBI->connect("dbi:mysql:kohabenchmark", 'youruserid', 'yourpassword');
my $count=$ARGV[0];
Index: getdata-steve
===================================================================
RCS file: /cvsroot/koha/koha/marc/benchmarks/getdata-steve,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** getdata-steve 17 May 2002 22:03:15 -0000 1.1
--- getdata-steve 30 May 2002 19:55:19 -0000 1.2
***************
*** 8,23 ****
! my $dbh=DBI->connect("dbi:mysql:kohabenchmark", 'root', 'testpass');
my $count=$ARGV[0];
my $print=$ARGV[1];
! my $bibid=$ARGV[2];
for ($i=0; $i<$count; $i++) {
! ($bibid) || ($bibid=int(rand(79998))+1);
($print) && (print "BIBID: $bibid\n");
! my $sth=$dbh->prepare("select tagid,tag,subfieldcode,subfieldvalue from
marc_2XX_subfield_table where bibid=$bibid order by tagid,subfieldorder");
$sth->execute;
my $lasttag='';
--- 8,25 ----
! my $dbh=DBI->connect("dbi:mysql:kohabenchmark", 'youruserid', 'yourpassword');
my $count=$ARGV[0];
my $print=$ARGV[1];
! my $max=$ARGV[2];
! my $bibid=$ARGV[3];
! ($max) || ($max=79998);
for ($i=0; $i<$count; $i++) {
! ($bibid) || ($bibid=int(rand($max))+1);
($print) && (print "BIBID: $bibid\n");
! my $sth=$dbh->prepare("select tagid,tag,subfieldcode,subfieldvalue from
marc_subfield_table where bibid=$bibid order by tagid,subfieldorder");
$sth->execute;
my $lasttag='';
Index: runbenchmark
===================================================================
RCS file: /cvsroot/koha/koha/marc/benchmarks/runbenchmark,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** runbenchmark 17 May 2002 22:03:15 -0000 1.1
--- runbenchmark 30 May 2002 19:55:19 -0000 1.2
***************
*** 5,9 ****
# random records each time. Results will be printed to STDOUT.
! my @benchmarks=('getdata-steve', 'getdata-paul', 'getdata-paul-regex');
my $iterations=5;
--- 5,13 ----
# random records each time. Results will be printed to STDOUT.
! my @benchmarks=('getdata-steve', 'getdata-sergey');
! my $numrecords=$ARGV[0];
! my $numindb=$ARGV[1];
! ($numrecords) || ($numrecords=50);
! ($numindb) || ($numindb=79998);
my $iterations=5;
***************
*** 12,16 ****
print "$_:\t";
for ($i=1; $i<=$iterations; $i++) {
! my $timer=`/usr/bin/time -f "%E" perl $_ 500 2>&1`;
chomp $timer;
print "$timer\t";
--- 16,20 ----
print "$_:\t";
for ($i=1; $i<=$iterations; $i++) {
! my $timer=`/usr/bin/time -f "%E" perl $_ $numrecords 0 $numindb 2>&1`;
chomp $timer;
print "$timer\t";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/marc/benchmarks benchmarkschema,1.3,1.4 generaterandomdata,1.1,1.2 getdata-paul,1.1,1.2 getdata-paul-regex,1.1,1.2 getdata-steve,1.1,1.2 runbenchmark,1.1,1.2,
Steve Tonnesen <=