List:Commits« Previous MessageNext Message »
From:Martin Zaun Date:June 7 2011 2:12pm
Subject:bzr commit into mysql-5.1-telco-7.1 branch (martin.zaun:4236)
View as plain text  
#At file:///Users/mz/mysql/ndb-7.1-dbg64/ based on revid:craig.russell@stripped

 4236 Martin Zaun	2011-06-07
      crund - preparing for generic CrundLoad class

    modified:
      storage/ndb/test/crund/config_samples/crundClusterj.properties
      storage/ndb/test/crund/config_samples/crundDerby.properties
      storage/ndb/test/crund/config_samples/crundMysql.properties
      storage/ndb/test/crund/config_samples/crundNdbapi.properties
      storage/ndb/test/crund/config_samples/crundNdbj.properties
      storage/ndb/test/crund/config_samples/crundNdbjtie.properties
      storage/ndb/test/crund/config_samples/crundOpenjpaClusterj.properties
      storage/ndb/test/crund/config_samples/crundOpenjpaDerby.properties
      storage/ndb/test/crund/config_samples/crundOpenjpaMysql.properties
      storage/ndb/test/crund/config_samples/crundRun.properties
      storage/ndb/test/crund/config_samples/env.properties
      storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java
      storage/ndb/test/crund/src/com/mysql/cluster/crund/CrundDriver.java
      storage/ndb/test/crund/src/com/mysql/cluster/crund/Driver.java
      storage/ndb/test/crund/src/com/mysql/cluster/crund/JdbcLoad.java
      storage/ndb/test/crund/src/com/mysql/cluster/crund/JpaLoad.java
      storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbApiLoad.java
      storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java
      storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbjLoad.java
      storage/ndb/test/crund/src/com/mysql/cluster/crund/ResultProcessor.java
      storage/ndb/test/crund/src/crundndb/Driver.cpp
      storage/ndb/test/crund/src/crundndb/Driver.hpp
=== modified file 'storage/ndb/test/crund/config_samples/crundClusterj.properties'
--- a/storage/ndb/test/crund/config_samples/crundClusterj.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundClusterj.properties	2011-06-07 14:12:24 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 # XXX NPE with clusterj if field = null
 #exclude=setVarbinary1,setVarbinary1_batch,getVarbinary1,getVarbinary1_batch,setVarbinary10,setVarbinary10_batch,getVarbinary10,getVarbinary10_batch,setVarbinary100,setVarbinary100_batch,getVarbinary100,getVarbinary100_batch
 #exclude=navA->B0

=== modified file 'storage/ndb/test/crund/config_samples/crundDerby.properties'
--- a/storage/ndb/test/crund/config_samples/crundDerby.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundDerby.properties	2011-06-07 14:12:24 +0000
@@ -1,5 +1,4 @@
-# Copyright 2010 Sun Microsystems, Inc.
-#  All rights reserved. Use is subject to license terms.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,7 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 # not implemented by other backends yet
 #exclude=setBlob1000,getBlob1000,setBlob10000,getBlob10000,setBlob100000,getBlob100000,setText1000,getText1000,setText10000,getText10000,setText100000,getText100000
 #exclude=navA->B0,navA->B0_opt

=== modified file 'storage/ndb/test/crund/config_samples/crundMysql.properties'
--- a/storage/ndb/test/crund/config_samples/crundMysql.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundMysql.properties	2011-06-07 14:12:24 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 # blobs seem to work but not implemented in other backends yet
 exclude=setBlob1000,setBlob1000_batch,getBlob1000,getBlob1000_batch,setBlob10000,setBlob10000_batch,getBlob10000,getBlob10000_batch,setBlob100000,setBlob100000_batch,getBlob100000,getBlob100000_batch,setText1000,setText1000_batch,getText1000,getText1000_batch,setText10000,setText10000_batch,getText10000,getText10000_batch,setText100000,setText100000_batch,getText100000,getText100000_batch
 

=== modified file 'storage/ndb/test/crund/config_samples/crundNdbapi.properties'
--- a/storage/ndb/test/crund/config_samples/crundNdbapi.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundNdbapi.properties	2011-06-07 14:12:24 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 #exclude=navA->B0,navA->B0_forceSend,navA->B0_alt,navA->B0_alt_forceSend
 #exclude=navA->B0_alt,navA->B0_alt_forceSend
 #exclude=navA->B0_alt_forceSend

=== modified file 'storage/ndb/test/crund/config_samples/crundNdbj.properties'
--- a/storage/ndb/test/crund/config_samples/crundNdbj.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundNdbj.properties	2011-06-07 14:12:24 +0000
@@ -1,5 +1,4 @@
-# Copyright 2010 Sun Microsystems, Inc.
-#  All rights reserved. Use is subject to license terms.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,7 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 # throws exceptions, see NdbjLoad.java
 #exclude=navA->B0,navA->B0_forceSend,navA->B0_alt,navA->B0_alt_forceSend
 

=== modified file 'storage/ndb/test/crund/config_samples/crundNdbjtie.properties'
--- a/storage/ndb/test/crund/config_samples/crundNdbjtie.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundNdbjtie.properties	2011-06-07 14:12:24 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 # XXX not yet implemented by NdbJTie
 #exclude=setVarbinary1,setVarbinary1_batch,getVarbinary1,getVarbinary1_batch,setVarchar1,setVarchar1_batch,getVarchar1,getVarchar1_batch,setVarbinary10,setVarbinary10_batch,getVarbinary10,getVarbinary10_batch,setVarchar10,setVarchar10_batch,getVarchar10,getVarchar10_batch,setVarbinary100,setVarbinary100_batch,getVarbinary100,getVarbinary100_batch,setVarchar100,setVarchar100_batch,getVarchar100,getVarchar100_batch,setB0->A,setB0->A_batch,navB0->A,navB0->A_batch,navB0->A_alt,navB0->A_alt_batch,navA->B0,navA->B0_forceSend,navA->B0_alt,navA->B0_alt_forceSend,nullB0->A,nullB0->A_batch
 #exclude=navA->B0,navA->B0_forceSend,navA->B0_alt,navA->B0_alt_forceSend

=== modified file 'storage/ndb/test/crund/config_samples/crundOpenjpaClusterj.properties'
--- a/storage/ndb/test/crund/config_samples/crundOpenjpaClusterj.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundOpenjpaClusterj.properties	2011-06-07 14:12:24 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 #exclude=navA->B0,navA->B0_opt
 #exclude=setAByPK_bulk,setB0ByPK_bulk,setAByPK,setB0ByPK,getAByPK,getB0ByPK
 

=== modified file 'storage/ndb/test/crund/config_samples/crundOpenjpaDerby.properties'
--- a/storage/ndb/test/crund/config_samples/crundOpenjpaDerby.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundOpenjpaDerby.properties	2011-06-07 14:12:24 +0000
@@ -1,5 +1,4 @@
-# Copyright 2010 Sun Microsystems, Inc.
-#  All rights reserved. Use is subject to license terms.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,7 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 #exclude=navA->B0,navA->B0_opt
 
 # JPA - Derby connection settings

=== modified file 'storage/ndb/test/crund/config_samples/crundOpenjpaMysql.properties'
--- a/storage/ndb/test/crund/config_samples/crundOpenjpaMysql.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundOpenjpaMysql.properties	2011-06-07 14:12:24 +0000
@@ -1,5 +1,4 @@
-# Copyright 2010 Sun Microsystems, Inc.
-#  All rights reserved. Use is subject to license terms.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,7 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
 #exclude=navA->B0,navA->B0_opt
 
 # OpenJPA - MySQL JDBC connection settings

=== modified file 'storage/ndb/test/crund/config_samples/crundRun.properties'
--- a/storage/ndb/test/crund/config_samples/crundRun.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/crundRun.properties	2011-06-07 14:12:24 +0000
@@ -51,26 +51,25 @@ renewConnection=false
 allowExtendedPC=false
 
 # the number of warmup and finally recorded runs
-warmupRuns=0
-hotRuns=1
-#hotRuns=20
+nRuns=1
+#nRuns=20
 
 # CURRENT LIMITS:
 #
 # ndbd errors (increase SendBufferMemory) at:
-# aEnd, bEnd >= 65536
+# nOps >= 65536
 #
 # ndbapi@(A=16384, B=16384) fails at running out of MaxNoOfLocalOperations
 # increase the correlated from default MaxNoOfConcurrentOperations=32768
 # MaxNoOfConcurrentOperations=65536
 #
 # msqld errors with JDBC (increase MaxNoOfConcurrentOperations) at:
-# aEnd, bEnd >= 16384 
+# nOps >= 16384 
 #
 # NdbApi (driver+load) at:
-# aEnd, bEnd >= 4096:
+# nOps >= 4096:
 #
-# ClusterJ breaks in navA->B0,navA->B0_opt at: aEnd, bEnd >= 4096
+# ClusterJ breaks in navA->B0,navA->B0_opt at: nOps >= 4096
 # clusterj@(A=4096, B=4096) fails at MaxNoOfConcurrentTransactions=4096
 # clusterj@(A=16384, B=16384) fails at MaxNoOfConcurrentTransactions=16384
 #MaxNoOfConcurrentTransactions=16384

=== modified file 'storage/ndb/test/crund/config_samples/env.properties'
--- a/storage/ndb/test/crund/config_samples/env.properties	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/config_samples/env.properties	2011-06-07 14:12:24 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -11,7 +11,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 # Common Configuration File included by Ant, Makefile, and Shell Scripts
 
@@ -37,8 +37,8 @@ HOME=/Users/mz
 # no quotes (interpreted by ant):
 #MYSQL_HOME=${HOME}/mysql/bin-7.1-opt32
 #MYSQL_HOME=${HOME}/mysql/bin-7.1-dbg32
-MYSQL_HOME=${HOME}/mysql/bin-7.1-opt64
-#MYSQL_HOME=${HOME}/mysql/bin-7.1-dbg64
+#MYSQL_HOME=${HOME}/mysql/bin-7.1-opt64
+MYSQL_HOME=${HOME}/mysql/bin-7.1-dbg64
 #MYSQL_HOME="${HOME}/bin/mysql-cluster-gpl-6.3.20"
 
 # must match architecture of MYSQL_HOME
@@ -63,7 +63,8 @@ MYSQL_LIBEXEC="$MYSQL_HOME/libexec"
 # - Martin's Little Helpers utilities (see below)
 
 #JAVA_INCLUDEOPTS=-I"/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers"
-JAVA_INCLUDEOPTS=-I"/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers"
+#JAVA_INCLUDEOPTS=-I"/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers"
+JAVA_INCLUDEOPTS=-I"/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers"
 #JAVA_INCLUDEOPTS=-I"/usr/lib/jvm/java-6-sun/include" -I"/usr/lib/jvm/java-6-sun/include/linux"
 
 # Comments:
@@ -163,7 +164,7 @@ CLUSTERJPA_JAR=${MYSQL_CLUSTERJ}/share/m
 # Must be set & valid for running
 # - JdbcLoad on MySQL
 
-MYSQL_JDBC_JAR=${HOME}/mysql/lib/mysql-connector-java-5.1.11-bin.jar
+MYSQL_JDBC_JAR=${HOME}/mysql/lib/mysql-connector-java-5.1.16-bin.jar
 
 # Comments:
 # - get from here:
@@ -195,12 +196,12 @@ JPA_API_JAR=${HOME}/mysql/lib/geronimo-j
 # Must be set & valid for running
 # - JpaLoad on OpenJPA
 
-JTA_API_JAR=${HOME}/mysql/lib/geronimo-jta_1.1_spec-1.1.jar
+JTA_API_JAR=${HOME}/mysql/lib/geronimo-jta_1.1_spec-1.1.1.jar
 OPENJPA_JAR=${HOME}/mysql/lib/openjpa-1.2.2.jar
 SERP_JAR=${HOME}/mysql/lib/serp-1.13.1.jar
-COMMONS_LANG_JAR=${HOME}/mysql/lib/commons-lang-2.1.jar
-COMMONS_COLLECTIONS_JAR=${HOME}/mysql/lib/commons-collections-3.2.jar
-COMMONS_POOL_JAR=${HOME}/mysql/lib/commons-pool-1.3.jar
+COMMONS_LANG_JAR=${HOME}/mysql/lib/commons-lang-2.4.jar
+COMMONS_COLLECTIONS_JAR=${HOME}/mysql/lib/commons-collections-3.2.1.jar
+COMMONS_POOL_JAR=${HOME}/mysql/lib/commons-pool-1.5.3.jar
 
 # Comments:
 # - included in the binary release

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java	2011-06-02 21:43:17 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java	2011-06-07 14:12:24 +0000
@@ -92,14 +92,9 @@ public class ClusterjLoad extends CrundD
     }
 
     @Override
-    protected void init() throws Exception {
-        super.init();
-
-        // load native library (better diagnostics doing it explicitely)
-        out.println();
-        //loadSystemLibrary("ndbj");
-
-        // instantiate NDB cluster singleton
+    protected void initLoad() throws Exception {
+        // XXX support generic load class
+        //super.init();
 
         out.println();
         out.print("creating SessionFactory ...");
@@ -109,7 +104,8 @@ public class ClusterjLoad extends CrundD
     }
 
     @Override
-    protected void close() throws Exception {
+    protected void closeLoad() throws Exception {
+        out.println();
         out.print("closing SessionFactory ...");
         out.flush();
         if (sessionFactory != null)
@@ -117,7 +113,8 @@ public class ClusterjLoad extends CrundD
         sessionFactory = null;
         out.println("      [ok]");
 
-        super.close();
+        // XXX support generic load class
+        //super.close();
     }
 
     // ----------------------------------------------------------------------
@@ -577,19 +574,21 @@ public class ClusterjLoad extends CrundD
     // ----------------------------------------------------------------------
 
     protected void initConnection() {
-        out.print("creating Session ...");
+        out.println();
+        out.print("creating ClusterJ Session ...");
         out.flush();
         session = sessionFactory.getSession();
-        out.println("            [Session: 1]");
+        out.println("   [Session: 1]");
     }
 
     protected void closeConnection() {
-        out.print("closing Session ...");
+        out.println();
+        out.print("closing ClusterJ Session ...");
         out.flush();
         if (session != null)
             session.close();
         session = null;
-        out.println("             [ok]");
+        out.println("    [ok]");
     }
 
     protected void clearPersistenceContext() {

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/CrundDriver.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/CrundDriver.java	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/CrundDriver.java	2011-06-07 14:12:24 +0000
@@ -74,12 +74,61 @@ abstract public class CrundDriver extend
     // ----------------------------------------------------------------------
 
     protected void init() throws Exception {
+        out.println();
+        out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+        out.println("initializing benchmark ...");
+        out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
         super.init();
-        // do work here
+
+/*
+        // XXX support multiple load instances
+        // initialize load classes
+        if (doJdbc) {
+            assert (jdbcLoad == null);
+            jdbcLoad = new JdbcLoad(this);
+            jdbcLoad.init();
+        }
+        if (doClusterj) {
+            assert (clusterjLoad == null);
+            clusterjLoad = new ClusterjLoad(this);
+            clusterjLoad.init();
+        }
+        if (doNdbjtie) {
+            assert (ndbjtieLoad == null);
+            ndbjtieLoad = new NdbjtieLoad(this);
+            ndbjtieLoad.init();
+        }
+*/
+        initLoad();
     }    
 
     protected void close() throws Exception {
-        // do work here
+        out.println();
+        out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+        out.println("closing benchmark ...");
+        out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+
+/*
+        // XXX support multiple load instances
+        // close load classes
+        if (doJdbc) {
+            assert (jdbcLoad != null);
+            jdbcLoad.close();
+            jdbcLoad = null;
+        }
+        if (doClusterj) {
+            assert (clusterjLoad != null);
+            clusterjLoad.close();
+            clusterjLoad = null;
+        }
+        if (doNdbjtie) {
+            assert (ndbjtieLoad != null);
+            ndbjtieLoad.close();
+            ndbjtieLoad = null;
+        }
+*/
+        closeLoad();
+
         super.close();
     }
 
@@ -176,6 +225,7 @@ abstract public class CrundDriver extend
     // benchmark operations
     // ----------------------------------------------------------------------
 
+    // XXX move to generic load class
     // a database operation to be benchmarked
     protected abstract class Op {
         final protected String name;
@@ -187,6 +237,7 @@ abstract public class CrundDriver extend
         public abstract void run(int nOps) throws Exception;
     };
 
+    // XXX move to generic load class
     // the list of database operations to be benchmarked
     protected final List<Op> ops = new ArrayList<Op>();
 
@@ -195,36 +246,63 @@ abstract public class CrundDriver extend
     abstract protected void closeOperations() throws Exception;
 
     protected void runTests() throws Exception {
-        out.println();
-        initConnection();
-        initOperations();
-
+        initConnections();
+        runLoads();
+        closeConnections();
+    }
+    
+    protected void runLoads() throws Exception {
+/*
+        // XXX support multiple load instances
+        if (doJdbc)
+            runLoads(jdbcLoad);
+        if (doClusterj)
+            runLoads(clusterjLoad);
+        if (doNdbjtie)
+            runLoads(ndbjtieLoad);
+*/
+        runLoad();
+    }
+    
+    protected void runLoad() throws Exception {
         assert (nOpsStart <= nOpsEnd && nOpsScale > 1);
         for (int i = nOpsStart; i <= nOpsEnd; i *= nOpsScale) {
             try {
-                runLoads(i);
+                out.println();
+                out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+                // XXX support multiple load instances
+                //out.print("running load nOps = " + i + " on "
+                //          + load.getDescriptor());
+                out.println("running load [" + i + " nOps] on " + descr);
+                out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+                runSeries(i);
             } catch (Exception ex) {
                 // already in rollback for database/orm exceptions
                 throw ex;
             }
         }
-
-        out.println();
-        out.println("------------------------------------------------------------");
-        out.println();
-
-        clearData();
-        closeOperations();
-        closeConnection();
     }
 
-    protected void runLoads(int nOps) throws Exception {
-        out.println();
-        out.println("------------------------------------------------------------");
+    protected void runSeries(int nOps) throws Exception {
+        if (nRuns == 0)
+            return; // nothing to do
 
-        out.println("running operations ..."
-                    + "          [nOps=" + nOps + "]");
+        for (int i = 1; i <= nRuns; i++) {
+            out.println();
+            out.println("------------------------------------------------------------");
+            out.println("run " + i + " of " + nRuns + " [" + nOps + " nOps]");
+            out.println("------------------------------------------------------------");
+            // XXX runLoad(load);
+            runLoad(nOps);
+        }
 
+        // XXX support multiple load instances
+        //writeLogBuffers(load.getDescriptor());
+        writeLogBuffers(descr);
+        clearLogBuffers();
+    }
+
+    protected void runLoad(int nOps) throws Exception {
         // log buffers
         if (logRealTime) {
             rtimes.append(nOps);
@@ -237,6 +315,7 @@ abstract public class CrundDriver extend
 
         // pre-run cleanup
         if (renewConnection) {
+            // XXX move to generic load class?
             closeOperations();
             closeConnection();
             initConnection();
@@ -247,7 +326,7 @@ abstract public class CrundDriver extend
         }
         clearData();
 
-        runOperations(nOps);
+        runSequence(nOps);
 
         if (logSumOfOps) {
             out.println();
@@ -284,7 +363,8 @@ abstract public class CrundDriver extend
         }
     }
 
-    protected void runOperations(int nOps) throws Exception {
+    // XXX move to generic load class
+    protected void runSequence(int nOps) throws Exception {
         for (Op op : ops) {
             // pre-tx cleanup
             if (!allowExtendedPC) {
@@ -292,11 +372,12 @@ abstract public class CrundDriver extend
                 // any data/result caches before the next transaction
                 clearPersistenceContext();
             }
-            runOp(op, nOps);
+            runOperation(op, nOps);
         }
     }
 
-    protected void runOp(Op op, int nOps) throws Exception {
+    // XXX move to generic load class
+    protected void runOperation(Op op, int nOps) throws Exception {
         final String name = op.getName();
         if (!exclude.contains(name)) {
             begin(name);
@@ -305,6 +386,7 @@ abstract public class CrundDriver extend
         }
     }
 
+    // XXX move to generic load class
     // reports an error if a condition is not met
     static protected final void verify(boolean cond) {
         //assert (cond);
@@ -312,6 +394,7 @@ abstract public class CrundDriver extend
             throw new RuntimeException("data verification failed.");
     }
 
+    // XXX move to generic load class
     static protected final void verify(int exp, int act) {
         if (exp != act)
             throw new RuntimeException("data verification failed:"
@@ -319,6 +402,7 @@ abstract public class CrundDriver extend
                                        + ", actual = " + act);
     }
 
+    // XXX move to generic load class
     static protected final void verify(String exp, String act) {
         if ((exp == null && act != null)
             || (exp != null && !exp.equals(act)))
@@ -331,6 +415,7 @@ abstract public class CrundDriver extend
     // helpers
     // ----------------------------------------------------------------------
 
+    // XXX move to generic load class
     static final protected String myString(int n) {
         final StringBuilder s = new StringBuilder();
         switch (n) {
@@ -361,6 +446,7 @@ abstract public class CrundDriver extend
         return s.toString();
     }
 
+    // XXX move to generic load class
     static final protected byte[] myBytes(String s) {
         final char[] c = s.toCharArray();
         final int n = c.length;
@@ -369,6 +455,7 @@ abstract public class CrundDriver extend
         return b;
     }
 
+    // XXX move to generic load class
     // some string and byte constants
     static final protected String string1 = myString(1);
     static final protected String string2 = myString(2);
@@ -393,6 +480,63 @@ abstract public class CrundDriver extend
     // datastore operations
     // ----------------------------------------------------------------------
 
+    protected void initConnections() throws Exception {
+        out.println();
+        out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+        out.println("initializing connections ...");
+        out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+
+/*
+        // XXX support multiple load instances
+        if (doJdbc) {
+            assert (jdbcLoad != null);
+            jdbcLoad.initConnection();
+        }
+        if (doClusterj) {
+            assert (clusterjLoad != null);
+            clusterjLoad.initConnection();
+        }
+        if (doNdbjtie) {
+            assert (ndbjtieLoad != null);
+            ndbjtieLoad.initConnection();
+        }
+*/
+        initConnection();
+
+        // XXX move to generic load class
+        initOperations();
+    }
+
+    protected void closeConnections() throws Exception {
+        out.println();
+        out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+        out.println("closing connections ...");
+        out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+
+        // XXX move to generic load class
+        clearData();
+        closeOperations();
+
+        closeConnection();
+/*
+        // XXX support multiple load instances
+        if (doJdbc) {
+            assert (jdbcLoad != null);
+            jdbcLoad.closeConnection();
+        }
+        if (doClusterj) {
+            assert (clusterjLoad != null);
+            clusterjLoad.closeConnection();
+        }
+        if (doNdbjtie) {
+            assert (ndbjtieLoad != null);
+            ndbjtieLoad.closeConnection();
+        }
+*/
+    }
+
+    abstract protected void initLoad() throws Exception;
+    abstract protected void closeLoad() throws Exception;
     abstract protected void initConnection() throws Exception;
     abstract protected void closeConnection() throws Exception;
     abstract protected void clearPersistenceContext() throws Exception;

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/Driver.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/Driver.java	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/Driver.java	2011-06-07 14:12:24 +0000
@@ -70,8 +70,7 @@ abstract public class Driver {
     protected boolean logRealTime;
     protected boolean logMemUsage;
     protected boolean includeFullGC;
-    protected int warmupRuns;
-    protected int hotRuns;
+    protected int nRuns;
 
     // driver resources
     protected PrintWriter log;
@@ -144,49 +143,7 @@ abstract public class Driver {
     public void run() {
         try {
             init();
-
-            if (warmupRuns > 0) {
-                out.println();
-                out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
-                out.println("warmup runs ...");
-                out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
-
-                for (int i = 0; i < warmupRuns; i++) {
-                    runTests();
-                }
-
-                // truncate log file, reset log buffers
-                closeLogFile();
-                openLogFile();
-                header = new StringBuilder();
-                rtimes = new StringBuilder();
-                musage = new StringBuilder();
-                logHeader = true;
-            }
-            
-            if (hotRuns > 0) {
-                out.println();
-                out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
-                out.println("hot runs ...");
-                out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
-
-                for (int i = 0; i < hotRuns; i++) {
-                    runTests();
-                }
-
-                // write log buffers
-                if (logRealTime) {
-                    log.println(descr + ", rtime[ms]"
-                                + header.toString() + endl
-                                + rtimes.toString() + endl + endl + endl);
-                }
-                if (logMemUsage) {
-                    log.println(descr + ", net musage[KiB]"
-                                + header.toString() + endl
-                                + musage.toString() + endl + endl + endl);
-                }
-            }
-            
+            runTests();
             close();
         } catch (Exception ex) {
             // end the program regardless of threads
@@ -251,17 +208,13 @@ abstract public class Driver {
         initProperties();
         printProperties();
         openLogFile();
-
-        // clear log buffers
-        logHeader = true;
-        header = new StringBuilder();
-        rtimes = new StringBuilder();
-        musage = new StringBuilder();
+        clearLogBuffers();
     }
 
     // releases the driver's resources.
     protected void close() throws Exception {
-        // clear log buffers
+        // release log buffers
+        logHeader = false;
         header = null;
         rtimes = null;
         musage = null;
@@ -319,16 +272,10 @@ abstract public class Driver {
         logMemUsage = parseBoolean("logMemUsage", false);
         includeFullGC = parseBoolean("includeFullGC", false);
 
-        warmupRuns = parseInt("warmupRuns", 0);
-        if (warmupRuns < 0) {
-            msg.append("[ignored] warmupRuns:           " + warmupRuns + eol);
-            warmupRuns = 0;
-        }
-
-        hotRuns = parseInt("hotRuns", 1);
-        if (hotRuns < 1) {
-            msg.append("[ignored] hotRuns:              " + hotRuns + eol);
-            hotRuns = 1;
+        nRuns = parseInt("nRuns", 1);
+        if (nRuns < 1) {
+            msg.append("[ignored] nRuns:                " + nRuns + eol);
+            nRuns = 1;
         }
 
         if (msg.length() == 0) {
@@ -346,8 +293,7 @@ abstract public class Driver {
         out.println("logRealTime:                    " + logRealTime);
         out.println("logMemUsage:                    " + logMemUsage);
         out.println("includeFullGC:                  " + includeFullGC);
-        out.println("warmupRuns:                     " + warmupRuns);
-        out.println("hotRuns:                        " + hotRuns);
+        out.println("nRuns:                          " + nRuns);
     }
 
     // opens the benchmark's data log file
@@ -359,6 +305,7 @@ abstract public class Driver {
 
     // closes the benchmark's data log file
     private void closeLogFile() throws IOException {
+        out.println();
         out.print("closing files ...");
         out.flush();
         if (log != null) {
@@ -374,6 +321,30 @@ abstract public class Driver {
 
     abstract protected void runTests() throws Exception;
 
+    protected void clearLogBuffers() {
+        logHeader = true;
+        header = new StringBuilder();
+        if (logRealTime) {
+            rtimes = new StringBuilder();
+        }
+        if (logMemUsage) {
+            musage = new StringBuilder();
+        }
+    }
+    
+    protected void writeLogBuffers(String descr) {
+        if (logRealTime) {
+            log.println(descr + ", rtime[ms]"
+                        + header.toString() + endl
+                        + rtimes.toString() + endl);
+        }
+        if (logMemUsage) {
+            log.println(descr + ", net musage[KiB]"
+                        + header.toString() + endl
+                        + musage.toString() + endl);
+        }
+    }
+
     protected void begin(String name) {
         out.println();
         out.println(name);

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/JdbcLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/JdbcLoad.java	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/JdbcLoad.java	2011-06-07 14:12:24 +0000
@@ -110,6 +110,16 @@ public class JdbcLoad extends CrundDrive
         out.println("jdbc.autoCommit:                " + autoCommit);
     }
 
+    protected void initLoad() throws Exception {
+        // XXX support generic load class
+        //super.init();
+    }
+
+    protected void closeLoad() throws Exception {
+        // XXX support generic load class
+        //super.close();
+    }
+
     // ----------------------------------------------------------------------
     // JDBC operations
     // ----------------------------------------------------------------------
@@ -867,17 +877,19 @@ public class JdbcLoad extends CrundDrive
     // ----------------------------------------------------------------------
 
     protected void initConnection() throws SQLException {
-        out.print("initializing connection ...");
+        out.println();
+        out.print("creating JDBC connection ...");
         out.flush();
         conn = DriverManager.getConnection(url, user, password);
         conn.setAutoCommit(autoCommit);
         delAllA = conn.prepareStatement("DELETE FROM a");
         delAllB0 = conn.prepareStatement("DELETE FROM b0");
-        out.println("     [Conn: 1]");
+        out.println("    [Conn: 1]");
     }
 
     protected void closeConnection() throws SQLException {
-        out.print("closing connection ...");
+        out.println();
+        out.print("closing JDBC connection ...");
         out.flush();
         if (delAllB0 != null)
             delAllB0.close();
@@ -888,7 +900,7 @@ public class JdbcLoad extends CrundDrive
         if (conn != null)
             conn.close();
         conn = null;
-        out.println("          [ok]");
+        out.println("     [ok]");
     }
 
     protected void clearPersistenceContext() {

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/JpaLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/JpaLoad.java	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/JpaLoad.java	2011-06-07 14:12:24 +0000
@@ -137,26 +137,29 @@ public class JpaLoad extends CrundDriver
         out.println("openjpa.ndb.database:           " + ndbDatabase);
     }
 
-    protected void init() throws Exception {
-        super.init();
+    protected void initLoad() throws Exception {
+        // XXX support generic load class
+        //super.init();
 
         out.println();
-        out.print("creating EMFactory ...");
+        out.print("creating JPA EMFactory ...");
         out.flush();
         // create EMF by standard API, which allows vendors to pool factories
         emf = Persistence.createEntityManagerFactory("crundjpa", props);
-        out.println("          [EMF: 1]");
+        out.println("      [EMF: 1]");
     }
 
-    protected void close() throws Exception {
-        out.print("closing EMFactory ...");
+    protected void closeLoad() throws Exception {
+        out.println();
+        out.print("closing JPA EMFactory ...");
         out.flush();
         if (emf != null)
             emf.close();
         emf = null;
-        out.println("           [ok]");
+        out.println("       [ok]");
 
-        super.close();
+        // XXX support generic load class
+        //super.close();
     }
 
     // ----------------------------------------------------------------------
@@ -602,7 +605,8 @@ public class JpaLoad extends CrundDriver
     // ----------------------------------------------------------------------
 
     protected void initConnection() {
-        out.print("creating EntityManager ...");
+        out.println();
+        out.print("creating JPA EntityManager ...");
         out.flush();
         // See: clearPersistenceContext() for !allowExtendedPC
         // Tx-scope EM supported by JPA only by container injection:
@@ -619,18 +623,19 @@ public class JpaLoad extends CrundDriver
         //query.setHint("eclipselink.join-fetch", "e.address");
         delAllA = em.createQuery("DELETE FROM A");
         delAllB0 = em.createQuery("DELETE FROM B0");
-        out.println("      [EM: 1]");
+        out.println("  [EM: 1]");
     }
 
     protected void closeConnection() {
-        out.print("closing EntityManager ...");
+        out.println();
+        out.print("closing JPA EntityManager ...");
         out.flush();
         delAllB0 = null;
         delAllA = null;
         if (em != null)
             em.close();
         em = null;
-        out.println("       [ok]");
+        out.println("   [ok]");
     }
 
     protected void clearPersistenceContext() {

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbApiLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbApiLoad.java	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbApiLoad.java	2011-06-07 14:12:24 +0000
@@ -35,8 +35,9 @@ public class NdbApiLoad extends NdbBase 
     static protected native int ndbinit(String mgmd_host_portno);
     static protected native int ndbclose();
 
-    protected void init() throws Exception {
-        super.init();
+    protected void initLoad() throws Exception {
+        // XXX support generic load class
+        //super.init();
 
         // load dependent libs first
         out.println();
@@ -53,7 +54,7 @@ public class NdbApiLoad extends NdbBase 
         }
     }
 
-    protected void close() throws Exception {
+    protected void closeLoad() throws Exception {
         // release NDB resources
         final int ret = ndbclose();
         if (ret != 0) {
@@ -62,7 +63,9 @@ public class NdbApiLoad extends NdbBase 
             err.println(msg);
             throw new Exception(msg);
         }
-        super.close();
+
+        // XXX support generic load class
+        //super.close();
     }
 
     // ----------------------------------------------------------------------

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java	2011-06-07 14:12:24 +0000
@@ -78,8 +78,9 @@ public class NdbJTieLoad extends NdbBase
         descr = "->ndbjtie(" + mgmdConnect + ")";
     }
 
-    protected void init() throws Exception {
-        super.init();
+    protected void initLoad() throws Exception {
+        // XXX support generic load class
+        //super.init();
 
         // load native library (better diagnostics doing it explicitely)
         out.println();
@@ -109,14 +110,17 @@ public class NdbJTieLoad extends NdbBase
         out.println("          [ok: " + mgmdConnect + "]");
     }
 
-    protected void close() throws Exception {
-        out.print("closing mgmd conn ...");
+    protected void closeLoad() throws Exception {
+        out.println();
+        out.print("closing mgmd connection ...");
         out.flush();
         if (mgmd != null)
             Ndb_cluster_connection.delete(mgmd);
         mgmd = null;
-        out.println("           [ok]");
-        super.close();
+        out.println("     [ok]");
+
+        // XXX support generic load class
+        //super.close();
     }
 
     // ----------------------------------------------------------------------
@@ -895,8 +899,10 @@ public class NdbJTieLoad extends NdbBase
     // ----------------------------------------------------------------------
 
     protected void initConnection() {
+        out.println();
+
         // optionally, connect and wait for reaching the data nodes (ndbds)
-        out.print("waiting for data nodes...");
+        out.print("waiting for ndbd ...");
         out.flush();
         final int initial_wait = 10; // secs to wait until first node detected
         final int final_wait = 0;    // secs to wait after first node detected
@@ -907,10 +913,10 @@ public class NdbJTieLoad extends NdbBase
             out.println(msg);
             throw new RuntimeException(msg);
         }
-        out.println("       [ok]");
+        out.println("            [ok]");
 
         // connect to database
-        out.print("connecting to database...");
+        out.print("connecting to ndbd ...");
         out.flush();
         ndb = Ndb.create(mgmd, catalog, schema);
         final int max_no_tx = 10; // maximum number of parallel tx (<=1024)
@@ -919,19 +925,20 @@ public class NdbJTieLoad extends NdbBase
             String msg = "Error caught: " + ndb.getNdbError().message();
             throw new RuntimeException(msg);
         }
-        out.println("       [ok]");
+        out.println("          [ok]");
 
         // initialize the schema shortcuts
         model = new Model(ndb);
     }
 
     protected void closeConnection() {
-        out.print("closing database conn ...");
+        out.println();
+        out.print("closing ndbd connection ...");
         out.flush();
         model = null;
         Ndb.delete(ndb);
         ndb = null;
-        out.println("       [ok]");
+        out.println("     [ok]");
     }
 
     protected void clearData() {

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbjLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbjLoad.java	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbjLoad.java	2011-06-07 14:12:24 +0000
@@ -73,8 +73,9 @@ public class NdbjLoad extends NdbBase {
         descr = "->ndbj->ndbapi(" + mgmdConnect + ")";
     }
 
-    protected void init() throws Exception {
-        super.init();
+    protected void initLoad() throws Exception {
+        // XXX support generic load class
+        //super.init();
 
         // load native library (better diagnostics doing it explicitely)
         out.println();
@@ -102,17 +103,20 @@ public class NdbjLoad extends NdbBase {
             out.println(msg);
             throw new RuntimeException("!!! " + msg);
         }
-        out.println("      [ok: " + mgmdConnect + "]");
+        out.println("          [ok: " + mgmdConnect + "]");
     }
 
-    protected void close() throws Exception {
-        out.print("closing mgmd conn ...");
+    protected void closeLoad() throws Exception {
+        out.println();
+        out.print("closing mgmd connection ...");
         out.flush();
         if (mgmd != null)
             mgmd.close();
         mgmd = null;
-        out.println("       [ok]");
-        super.close();
+        out.println("     [ok]");
+
+        // XXX support generic load class
+        //super.close();
     }
 
     // ----------------------------------------------------------------------
@@ -1189,8 +1193,10 @@ public class NdbjLoad extends NdbBase {
     // ----------------------------------------------------------------------
 
     protected void initConnection() throws NdbApiException {
+        out.println();
+
         // optionally, connect and wait for reaching the data nodes (ndbds)
-        out.print("waiting for data nodes...");
+        out.print("waiting for ndbd ...");
         out.flush();
         final int initial_wait = 10; // secs to wait until first node detected
         final int final_wait = 0;    // secs to wait after first node detected
@@ -1204,10 +1210,10 @@ public class NdbjLoad extends NdbBase {
                         + (initial_wait + final_wait) + "s.");
             throw e;
         }
-        out.println("   [ok]");
+        out.println("            [ok]");
 
         // connect to database
-        out.print("connecting to database...");
+        out.print("connecting to ndbd ...");
         out.flush();
         try {
             // XXX where to set schema?
@@ -1223,26 +1229,27 @@ public class NdbjLoad extends NdbBase {
             out.println("!!! failed to connect: " + e);
             throw e;
         }
-        out.println("   [ok]");
+        out.println("          [ok]");
 
         // initialize the schema shortcuts
         model = new Model(ndb);
     }
 
     protected void closeConnection() {
-        out.print("closing database conn ...");
+        out.println();
+        out.print("closing ndbd connection ...");
         out.flush();
         model = null;
         ndb.close();
         ndb = null;
-        out.println("   [ok]");
+        out.println("     [ok]");
     }
 
     protected void clearData() throws NdbApiException {
         out.print("deleting all rows ...");
         out.flush();
         final int delB0 = delByScan(model.table_B0);
-        out.print("       [B0: " + delB0);
+        out.print("           [B0: " + delB0);
         out.flush();
         final int delA = delByScan(model.table_A);
         out.print(", A: " + delA);

=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/ResultProcessor.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/ResultProcessor.java	2011-02-02 09:52:33 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/ResultProcessor.java	2011-06-07 14:12:24 +0000
@@ -55,6 +55,7 @@ public class ResultProcessor {
          * @param	avg	the relative standard deviations
          */
         void report(String tag,
+                    int nRuns,
                     int nTxOps,
                     String[] op,
                     double[] avg,
@@ -72,6 +73,7 @@ public class ResultProcessor {
          * 
          */
         public void report(String tag,
+                           int nRuns,
                            int nTxOps,
                            String[] op,
                            double[] avg,
@@ -79,6 +81,7 @@ public class ResultProcessor {
                            double[] rsdev) {
             out.println();
             out.println("tag    = " + tag);
+            out.println("nRuns  = " + nRuns);
             out.println("nTxOps = " + nTxOps);
             out.println();
 
@@ -126,7 +129,7 @@ public class ResultProcessor {
     protected ResultReporter reporter;
     protected String[] header;
     protected int nTxOps;
-    protected int nval;
+    protected int nRuns;
     protected double[] ravg;
     protected double[] rdev;
 
@@ -252,7 +255,7 @@ public class ResultProcessor {
                 header = line.split("\\t");
                 assert (header.length > 0);
 
-                nval = 0;
+                nRuns = 0;
                 nTxOps = 0;
                 ravg = new double[header.length];
                 rdev = new double[header.length];
@@ -268,7 +271,7 @@ public class ResultProcessor {
                               + ", found: " + values.length);
                 throw new ParseException(msg, 0);
             }
-            nval++;
+            nRuns++;
 
             // parse nTxOps
             int n;
@@ -279,7 +282,7 @@ public class ResultProcessor {
                               + ": " + e);
                 throw new ParseException(msg, 0);
             }
-            if (nval == 1) {
+            if (nRuns == 1) {
                 nTxOps = n;
             } else if (nTxOps != n) {
                 String msg = ("line # " + lineNo
@@ -290,8 +293,8 @@ public class ResultProcessor {
             }
 
             // skip warmup runs
-            if (nval <= nIgnored) {
-                nval--;
+            if (nRuns <= nIgnored) {
+                nRuns--;
                 nIgnored--;
                 continue;
             }
@@ -310,7 +313,7 @@ public class ResultProcessor {
                 // compute running averages and squared deviations
                 final double v = l;
                 final double oavg = ravg[i];
-                final double navg = oavg + (v - oavg) / nval;
+                final double navg = oavg + (v - oavg) / nRuns;
                 final double odev = rdev[i];
                 final double ndev = odev + (v - oavg) * (v - navg);
                 ravg[i] = navg;
@@ -331,12 +334,12 @@ public class ResultProcessor {
         for (int i = 1; i <= nops; i++) {
             op[i-1] = header[i];
             avg[i-1] = ravg[i];
-            sdev[i-1] = Math.sqrt(rdev[i] / nval);
+            sdev[i-1] = Math.sqrt(rdev[i] / nRuns);
             rsdev[i-1] = (sdev[i-1] * 100.0) / avg[i-1];
         }
         final String tag = header[0];
 
-        reporter.report(tag, nTxOps, op, avg, sdev, rsdev);
+        reporter.report(tag, nRuns, nTxOps, op, avg, sdev, rsdev);
     }
     
     // ----------------------------------------------------------------------

=== modified file 'storage/ndb/test/crund/src/crundndb/Driver.cpp'
--- a/storage/ndb/test/crund/src/crundndb/Driver.cpp	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/src/crundndb/Driver.cpp	2011-06-07 14:12:24 +0000
@@ -114,32 +114,13 @@ void
 Driver::run() {
     init();
 
-    if (warmupRuns > 0) {
-        cout << endl
-             << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl
-             << "warmup runs ..." << endl
-             << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
-
-        for (int i = 0; i < warmupRuns; i++) {
-            runTests();
-        }
-
-        // truncate log file, reset log buffers
-        closeLogFile();
-        openLogFile();
-        header.rdbuf()->str("");
-        rtimes.rdbuf()->str("");
-        ctimes.rdbuf()->str("");
-        logHeader = true;
-    }
-
-    if (hotRuns > 0) {
+    if (nRuns > 0) {
         cout << endl
              << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl
              << "hot runs ..." << endl
              << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
 
-        for (int i = 0; i < hotRuns; i++) {
+        for (int i = 0; i < nRuns; i++) {
             runTests();
         }
 
@@ -201,18 +182,11 @@ Driver::initProperties() {
     logRealTime = toBool(props[L"logRealTime"], true);
     logCpuTime = toBool(props[L"logCpuTime"], false);
 
-    warmupRuns = toInt(props[L"warmupRuns"], 0, -1);
-    if (warmupRuns < 0) {
-        msg << "[ignored] warmupRuns:        '"
-            << toString(props[L"warmupRuns"]) << "'" << endl;
-        warmupRuns = 0;
-    }
-
-    hotRuns = toInt(props[L"hotRuns"], 1, -1);
-    if (hotRuns < 0) {
-        msg << "[ignored] hotRuns:           '"
-            << toString(props[L"hotRuns"]) << "'" << endl;
-        hotRuns = 1;
+    nRuns = toInt(props[L"nRuns"], 1, -1);
+    if (nRuns < 0) {
+        msg << "[ignored] nRuns:             '"
+            << toString(props[L"nRuns"]) << "'" << endl;
+        nRuns = 1;
     }
 
     //if (msg.tellp() == 0) // netbeans reports amibuities
@@ -233,8 +207,7 @@ Driver::printProperties() {
     cout << endl << "driver settings ..." << endl;
     cout << "logRealTime:                    " << logRealTime << endl;
     cout << "logCpuTime:                     " << logCpuTime << endl;
-    cout << "warmupRuns:                     " << warmupRuns << endl;
-    cout << "hotRuns:                        " << hotRuns << endl;
+    cout << "nRuns:                          " << nRuns << endl;
 
     cout.flags(f);
 }

=== modified file 'storage/ndb/test/crund/src/crundndb/Driver.hpp'
--- a/storage/ndb/test/crund/src/crundndb/Driver.hpp	2011-01-31 09:07:01 +0000
+++ b/storage/ndb/test/crund/src/crundndb/Driver.hpp	2011-06-07 14:12:24 +0000
@@ -71,8 +71,7 @@ protected:
     Properties props;
     bool logRealTime;
     bool logCpuTime;
-    int warmupRuns;
-    int hotRuns;
+    int nRuns;
 
     // driver resources
     ofstream log;


Attachment: [text/bzr-bundle] bzr/martin.zaun@oracle.com-20110607141224-f0hfwytlvletvr02.bundle
Thread
bzr commit into mysql-5.1-telco-7.1 branch (martin.zaun:4236) Martin Zaun7 Jun