浏览代码

What was called epoch_duration is really epoch_wait_time

It's the time between epoch starts, _including_ the Waksman network
precomputation times, not the duration of the epoch itself.
Ian Goldberg 1 年之前
父节点
当前提交
1b285acd68
共有 4 个文件被更改,包括 12 次插入11 次删除
  1. 6 6
      App/start.cpp
  2. 2 1
      App/start.hpp
  3. 1 1
      App/teems.cpp
  4. 3 3
      run_experiments.py

+ 6 - 6
App/start.cpp

@@ -7,8 +7,8 @@
 
 // Default 4 epochs
 int num_epochs = 4;
-// Default epoch_duration of 5 seconds
-int epoch_duration = 5;
+// Default epoch_wait_time of 5 seconds
+int epoch_wait_time = 5;
 // Default of 12 Waksman Networks (3 per private_route for 4 epochs)
 int num_WN_to_precompute = 12;
 // We'll always run the WN precomputation in the foreground
@@ -220,8 +220,8 @@ static void route_clients_test(NetIO &netio)
 {
 
     // Default epoch_interval is 5 sec
-    unsigned long epoch_interval = epoch_duration * 1000000;
-    printf("Epoch duration = %d\n", epoch_duration);
+    unsigned long epoch_interval = epoch_wait_time * 1000000;
+    printf("Epoch wait time = %d\n", epoch_wait_time);
 
     struct timeval exp_start;
     gettimeofday(&exp_start, NULL);
@@ -375,8 +375,8 @@ void start(NetIO &netio, char **args)
 
     if (*args && !strcmp(*args, "route_clients")) {
         ++args;
-        printf("num_epochs = %d, epoch_duration = %d, num_WN_to_precompute = %d\n",
-            num_epochs, epoch_duration, num_WN_to_precompute);
+        printf("num_epochs = %d, epoch_wait_time = %d, num_WN_to_precompute = %d\n",
+            num_epochs, epoch_wait_time, num_WN_to_precompute);
         route_clients_test(netio);
         return;
     }

+ 2 - 1
App/start.hpp

@@ -7,7 +7,8 @@
 // to do on the command line
 void start(NetIO &netio, char **args);
 
-extern int epoch_duration;
+extern int epoch_wait_time;
 extern int num_epochs;
 extern int num_WN_to_precompute;
+
 #endif

+ 1 - 1
App/teems.cpp

@@ -209,7 +209,7 @@ int main(int argc, char **argv)
             if (argv[1] == NULL) {
                 usage(progname);
             }
-            epoch_duration = int(atoi(argv[1]));
+            epoch_wait_time = int(atoi(argv[1]));
             argv += 2;
         } else if (!strcmp(*argv, "-e")) {
             if (argv[1] == NULL) {

+ 3 - 3
run_experiments.py

@@ -114,8 +114,8 @@ def run_exp(LOG_FOLDER, PRIVATE_ROUTE, NUM_EPOCHS, N, M, T, B, PRIV_OUT, PRIV_IN
 
                     # Either estimate from epoch_time_estimate for diagnostic
                     # or the one we got from diagnostic run
-                    epoch_duration = math.ceil(epoch_param)
-                    print("Epoch_duration = %d" % epoch_duration)
+                    epoch_wait_time = math.ceil(epoch_param)
+                    print("Epoch_wait_time = %d" % epoch_wait_time)
 
                     # Since launch is invoked from App/ ; we add a ../ to subfolder before
                     # passing it to slaunch
@@ -132,7 +132,7 @@ def run_exp(LOG_FOLDER, PRIVATE_ROUTE, NUM_EPOCHS, N, M, T, B, PRIV_OUT, PRIV_IN
                         nodes_to_include.append("s"+str(i))
                         slaunch.append("s"+str(i))
                     slaunch.append("-d")
-                    slaunch.append(str(epoch_duration))
+                    slaunch.append(str(epoch_wait_time))
                     slaunch.append("-e")
                     if(run == "experiment"):
                         slaunch.append(str(NUM_EPOCHS))