Adding test for encrypted cloud storage; Adding preparation timing test for Fidelius...
[iotcloud.git] / version2 / src / java / iotcloud / Test.java
index a3a5a7a8d64e3e39a9e7e4b87205e92ef2914ca3..72eae9fea59b9564761a784ba0ba6a8149afabb7 100644 (file)
@@ -11,7 +11,7 @@ import java.util.ArrayList;
 
 public class Test {
 
-    public static final  int NUMBER_OF_TESTS = 2; 
+    public static final int NUMBER_OF_TESTS = 2; 
 
     public static void main(String[] args)  throws ServerException {
         if (args[0].equals("2")) {
@@ -55,9 +55,12 @@ public class Test {
         List<TransactionStatus> transStatusList = new ArrayList<TransactionStatus>();
 
         // Setup the 2 clients
+        startTime = System.nanoTime();
         Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
         t1.initTable();
         System.out.println("T1 Ready");
+        endTime = System.nanoTime();
+        long keysPrep = endTime - startTime;
 
         long initTimeNet = timer.getTime();
 
@@ -74,7 +77,7 @@ public class Test {
         long keysDt = endTime - startTime;
         long keysNet = timer.getTime() - initTimeNet;
 
-        System.out.println("Total Key Create Time: " + keysDt / 1000000);
+        System.out.println("Total Preparation Time: " + keysPrep / 1000000);
         System.out.println("Total Key Create Time Network: " + keysNet / 1000000);
         System.out.println("Total Key Create Time no Network: " + (keysDt - keysNet) / 1000000);
         System.out.println();