last changes to build
authorbdemsky <bdemsky>
Thu, 16 Jul 2009 10:14:11 +0000 (10:14 +0000)
committerbdemsky <bdemsky>
Thu, 16 Jul 2009 10:14:11 +0000 (10:14 +0000)
Robust/src/Benchmarks/SingleTM/Vacation/Client.java
Robust/src/Benchmarks/SingleTM/Vacation/Vacation.java
Robust/src/Benchmarks/SingleTM/Vacation/defines [new file with mode: 0644]

index 52a277239cf3887d5ea8d6bbe711b966a3bc95f5..f2e03f80db013d455033eb16ae2a993b1decdd25 100644 (file)
@@ -161,8 +161,7 @@ public class Client extends Thread {
          ids[n] = (randomPtr.random_generate() % queryRange) + 1;
        }
        boolean isFound = false;
-       //atomic 
-       {
+       atomic {
          for (n = 0; n < numQuery; n++) {
            int t = types[n];
            int id = ids[n];
@@ -210,8 +209,7 @@ public class Client extends Thread {
 
       case ACTION_DELETE_CUSTOMER: {
        int customerId = randomPtr.posrandom_generate() % queryRange + 1;
-       //atomic 
-       {
+       atomic {
          int bill = managerPtr.manager_queryCustomerBill(customerId);
          if (bill >= 0) {
            managerPtr.manager_deleteCustomer(customerId);
@@ -231,8 +229,7 @@ public class Client extends Thread {
            prices[n] = ((randomPtr.posrandom_generate() % 5) * 10) + 50;
          }
        }
-       //atomic 
-       {
+       atomic {
          for (n = 0; n < numUpdate; n++) {
            int t = types[n];
            int id = ids[n];
@@ -276,8 +273,8 @@ public class Client extends Thread {
        //assert(0);
       } /* switch (action) */
     } /* for i */
+    Barrier.enterBarrier();
   }
-  Barrier.enterBarrier();
 }
 
 /* =============================================================================
index d3b680fe338a9b0ab2cdcdddb3b7c1767273a424..30bd269032951548b7e60b1e940c788b31fdfe4d 100644 (file)
@@ -292,7 +292,7 @@ public class Vacation {
     System.out.println("Running clients... ");
     start=System.currentTimeMillis();
 
-    //    Barrier.setBarrier(numThread);
+    Barrier.setBarrier(numThread);
 
     for(int i=1;i<numThread;i++) {
       clients[i].start();
diff --git a/Robust/src/Benchmarks/SingleTM/Vacation/defines b/Robust/src/Benchmarks/SingleTM/Vacation/defines
new file mode 100644 (file)
index 0000000..d543bfc
--- /dev/null
@@ -0,0 +1,24 @@
+#define ACTION_MAKE_RESERVATION 0
+#define ACTION_DELETE_CUSTOMER 1
+#define ACTION_UPDATE_TABLES 2
+#define NUM_ACTION 2
+#define PARAM_CLIENTS 'c'
+#define PARAM_NUMBER 'n'
+#define PARAM_QUERIES 'q'
+#define PARAM_RELATIONS 'r'
+#define PARAM_TRANSACTIONS 't'
+#define PARAM_USER 'u'
+#define PARAM_DEFAULT_CLIENTS      (1)
+#define PARAM_DEFAULT_NUMBER       (10)
+#define PARAM_DEFAULT_QUERIES      (90)
+#define PARAM_DEFAULT_RELATIONS    (1 << 16)
+#define PARAM_DEFAULT_TRANSACTIONS (1 << 26)
+#define PARAM_DEFAULT_USER         (80)
+#define RESERVATION_CAR 0
+#define RESERVATION_FLIGHT 1
+#define RESERVATION_ROOM 2
+#define NUM_RESERVATION_TYPE 3
+#define OPERATION_MAKE_RESERVATION 0L
+#define OPERATION_DELETE_CUSTOMER 1L
+#define OPERATION_UPDATE_TABLE 2L
+#define NUM_OPERATION 3