From 22214eb5d35143073ce0358ba52de913269d69f9 Mon Sep 17 00:00:00 2001 From: Ali Younis Date: Wed, 17 May 2017 13:08:59 -0700 Subject: [PATCH] Changes --- version2/src/java/iotcloud/Test.java | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/version2/src/java/iotcloud/Test.java b/version2/src/java/iotcloud/Test.java index 7c1e206..6919214 100644 --- a/version2/src/java/iotcloud/Test.java +++ b/version2/src/java/iotcloud/Test.java @@ -98,6 +98,11 @@ public class Test { t2.update(); System.out.println("T2 Ready"); + + + long initTimeNet = timer.getTime(); + + // Make the Keys System.out.println("Setting up keys"); startTime = System.nanoTime(); @@ -118,7 +123,7 @@ public class Test { } endTime = System.nanoTime(); long keysDt = endTime - startTime; - long keysNet = timer.getTime(); + long keysNet = timer.getTime() - initTimeNet; // Do Updates for the keys System.out.println("Setting Key-Values..."); @@ -165,7 +170,7 @@ public class Test { } endTime = System.nanoTime(); long writesDt = endTime - startTime; - long writesNet = timer.getTime() - keysNet; + long writesNet = timer.getTime() - keysNet - initTimeNet; System.out.println("Updating Clients..."); startTime = System.nanoTime(); @@ -173,7 +178,7 @@ public class Test { t2.update(); endTime = System.nanoTime(); long updatesDt = endTime - startTime; - long updatesNet = timer.getTime() - keysNet - writesNet; + long updatesNet = timer.getTime() - keysNet - writesNet - initTimeNet; System.out.println("Total Key Create Time: " + keysDt / 1000000); @@ -207,6 +212,10 @@ public class Test { t2.update(); System.out.println("T2 Ready"); + + long initTimeNet = timer.getTime(); + + // Make the Keys System.out.println("Setting up keys"); startTime = System.nanoTime(); @@ -227,7 +236,7 @@ public class Test { } endTime = System.nanoTime(); long keysDt = endTime - startTime; - long keysNet = timer.getTime(); + long keysNet = timer.getTime() - initTimeNet; // Do Updates for the keys System.out.println("Setting Key-Values..."); @@ -274,7 +283,7 @@ public class Test { } endTime = System.nanoTime(); long writesDt = endTime - startTime; - long writesNet = timer.getTime() - keysNet; + long writesNet = timer.getTime() - keysNet - initTimeNet; System.out.println("Updating Clients..."); startTime = System.nanoTime(); @@ -282,7 +291,7 @@ public class Test { t2.update(); endTime = System.nanoTime(); long updatesDt = endTime - startTime; - long updatesNet = timer.getTime() - keysNet - writesNet; + long updatesNet = timer.getTime() - keysNet - writesNet - initTimeNet; System.out.println("Total Key Create Time: " + keysDt / 1000000); -- 2.34.1