From: Ali Younis Date: Wed, 17 May 2017 21:57:19 +0000 (-0700) Subject: Filler code X-Git-Url: http://plrg.eecs.uci.edu/git/?p=iotcloud.git;a=commitdiff_plain;h=1801ce4637fcd919b0a7dbe27c04c3a62b817e2a Filler code --- diff --git a/version2/src/java/light_fan_embed_benchmark/Filler.java b/version2/src/java/light_fan_embed_benchmark/Filler.java new file mode 100644 index 0000000..6d553de --- /dev/null +++ b/version2/src/java/light_fan_embed_benchmark/Filler.java @@ -0,0 +1,49 @@ + + +import java.util.Scanner; +import iotcloud.*; +class Filler { + public static void main(String[] args) throws Exception { + + + Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 400, -1); + t1.rebuild(); // update + + + String a1 = "bulb1"; + String a2 = "bulb2"; + String a3 = "bulb3"; + IoTString ia1 = new IoTString(a1); + IoTString ia2 = new IoTString(a2); + IoTString ia3 = new IoTString(a3); + + String valueA = "on"; + String valueB = "off"; + IoTString iValueA = new IoTString(valueA); + IoTString iValueB = new IoTString(valueB); + + + System.out.println("Starting System"); + Scanner keyboard = new Scanner(System.in); + + for (int i = 0; i < 10; i++) { + + t1.update(); + t1.startTransaction(); + t1.addKV(ia1, iValueB); + t1.commitTransaction(); + + + t1.update(); + t1.startTransaction(); + t1.addKV(ia3, iValueB); + t1.commitTransaction(); + + t1.update(); + t1.startTransaction(); + t1.addKV(ia2, iValueB); + t1.commitTransaction(); + + } + } +} \ No newline at end of file diff --git a/version2/src/java/light_fan_embed_benchmark/runFiller.bash b/version2/src/java/light_fan_embed_benchmark/runFiller.bash new file mode 100755 index 0000000..a687509 --- /dev/null +++ b/version2/src/java/light_fan_embed_benchmark/runFiller.bash @@ -0,0 +1,3 @@ +#!/bin/sh + +java -cp .:../iotcloud/bin Filler \ No newline at end of file