Changes
authorAli Younis <ayounis@uci.edu>
Sun, 14 May 2017 23:50:46 +0000 (16:50 -0700)
committerAli Younis <ayounis@uci.edu>
Sun, 14 May 2017 23:50:46 +0000 (16:50 -0700)
version2/src/java/light_fan_embed_benchmark/LightsController.java
version2/src/java/light_fan_embed_benchmark/Setup.java
version2/src/java/light_fan_embed_benchmark/WemoController.java

index bc13be6..2fb3d1d 100644 (file)
@@ -93,18 +93,14 @@ class LightsController {
 
             try {
 
-                counter++;
-                if (counter == 10) {
-                    counter = 0;
 
-                    String pingTimer = Long.toString(System.currentTimeMillis());
-                    IoTString ipingTimer = new IoTString(pingTimer);
+                String pingTimer = Long.toString(System.currentTimeMillis());
+                IoTString ipingTimer = new IoTString(pingTimer);
 
-                    t1.update();
-                    t1.startTransaction();
-                    t1.addKV(ipingTimerKey, ipingTimer);
-                    t1.commitTransaction();
-                }
+                t1.update();
+                t1.startTransaction();
+                t1.addKV(ipingTimerKey, ipingTimer);
+                t1.commitTransaction();
 
 
                 t1.update();
index 232d594..ab6a231 100644 (file)
@@ -29,7 +29,7 @@ class Setup {
 
 
         String pingTimerKey2 = "wemoController";
-        IoTString ipingTimerKey2 = new IoTString(pingTimerKey);
+        IoTString ipingTimerKey2 = new IoTString(pingTimerKey2);
 
 
         t1.createNewKey(ia1, 321);
index e5830f4..f19ac62 100644 (file)
@@ -50,18 +50,13 @@ class WemoController {
 
         while (true) {
             try {
-                counter++;
-                if (counter == 10) {
-                    counter = 0;
+                String pingTimer = Long.toString(System.currentTimeMillis());
+                IoTString ipingTimer = new IoTString(pingTimer);
 
-                    String pingTimer = Long.toString(System.currentTimeMillis());
-                    IoTString ipingTimer = new IoTString(pingTimer);
-
-                    t1.update();
-                    t1.startTransaction();
-                    t1.addKV(ipingTimerKey, ipingTimer);
-                    t1.commitTransaction();
-                }
+                t1.update();
+                t1.startTransaction();
+                t1.addKV(ipingTimerKey, ipingTimer);
+                t1.commitTransaction();
 
 
                 t1.update();