|
@@ -15,6 +15,7 @@ import subprocess
|
|
import os
|
|
import os
|
|
import sys
|
|
import sys
|
|
import math
|
|
import math
|
|
|
|
+import time
|
|
from gen_manifest import generate_manifest
|
|
from gen_manifest import generate_manifest
|
|
from gen_enclave_config import generate_config
|
|
from gen_enclave_config import generate_config
|
|
from logs_to_csv import parse_output_logs
|
|
from logs_to_csv import parse_output_logs
|
|
@@ -24,10 +25,10 @@ from logs_to_csv import parse_output_logs
|
|
# CONFIGS TO SET:
|
|
# CONFIGS TO SET:
|
|
|
|
|
|
MANIFEST_FILE = "App/manifest.yaml"
|
|
MANIFEST_FILE = "App/manifest.yaml"
|
|
-LOG_FOLDER = "Test_diagnostic1/"
|
|
|
|
|
|
+LOG_FOLDER = "Test/"
|
|
|
|
|
|
NUM_EPOCHS = 5
|
|
NUM_EPOCHS = 5
|
|
-PRIVATE_ROUTE = True
|
|
|
|
|
|
+PRIVATE_ROUTE = False
|
|
PRIV_OUT = 1
|
|
PRIV_OUT = 1
|
|
PRIV_IN = 1
|
|
PRIV_IN = 1
|
|
PUB_OUT = 1
|
|
PUB_OUT = 1
|
|
@@ -43,14 +44,14 @@ PUB_IN = 1
|
|
# T = [16, 8, 4, 2, 1]
|
|
# T = [16, 8, 4, 2, 1]
|
|
|
|
|
|
## Figure 7
|
|
## Figure 7
|
|
-N = [1<<17]
|
|
|
|
-M = [4]
|
|
|
|
-T = [4]
|
|
|
|
|
|
+#N = [1<<15, 1<<16, 1<<17, 1<<18, 1<<19, 1<<20]
|
|
|
|
+#M = [4]
|
|
|
|
+#T = [4]
|
|
|
|
|
|
## Figure 8
|
|
## Figure 8
|
|
-# N = [1<<20]
|
|
|
|
-# M = [72, 64, 48, 36, 32, 24, 16, 8, 4, 2, 1]
|
|
|
|
-# T = [1]
|
|
|
|
|
|
+N = [1<<16, 1<<20]
|
|
|
|
+M = [72, 64, 48, 36, 32, 24, 16, 8, 4, 2, 1]
|
|
|
|
+T = [1]
|
|
|
|
|
|
# Max servers depending on number of threads (assuming 72 available
|
|
# Max servers depending on number of threads (assuming 72 available
|
|
# cores for servers)
|
|
# cores for servers)
|
|
@@ -105,8 +106,13 @@ if __name__ == "__main__":
|
|
for m in M:
|
|
for m in M:
|
|
if(m <= m_end):
|
|
if(m <= m_end):
|
|
for n in N:
|
|
for n in N:
|
|
- for run in ["diagnostic", "experiment"]:
|
|
|
|
|
|
+ #for run in ["diagnostic", "experiment"]:
|
|
|
|
+ for run in ["experiment"]:
|
|
num_WN_to_precompute = 0
|
|
num_WN_to_precompute = 0
|
|
|
|
+ if(PRIVATE_ROUTE):
|
|
|
|
+ num_WN_to_precompute = 2 * 3
|
|
|
|
+ else:
|
|
|
|
+ num_WN_to_precompute = 2 * 8
|
|
|
|
|
|
# Make the correct output folder for diagnostic/experiment
|
|
# Make the correct output folder for diagnostic/experiment
|
|
experiment_name = str(n) + "_" + str(m) + "_" + str(t) + "_" + str(b) + "/"
|
|
experiment_name = str(n) + "_" + str(m) + "_" + str(t) + "_" + str(b) + "/"
|
|
@@ -122,19 +128,22 @@ if __name__ == "__main__":
|
|
print("\n\n Running DIAGNOSTIC t = %d, m = %d, n = %d \n\n" % (t, m, n))
|
|
print("\n\n Running DIAGNOSTIC t = %d, m = %d, n = %d \n\n" % (t, m, n))
|
|
# Manifest generated by diagnostic can be reused by the actual experiment
|
|
# Manifest generated by diagnostic can be reused by the actual experiment
|
|
generate_manifest(n, m, t, b, PRIVATE_ROUTE, PRIV_OUT, PRIV_IN, PUB_OUT, PUB_IN)
|
|
generate_manifest(n, m, t, b, PRIVATE_ROUTE, PRIV_OUT, PRIV_IN, PUB_OUT, PUB_IN)
|
|
- generate_config(n, m, t, b, PRIVATE_ROUTE, PRIV_OUT, PRIV_IN, PUB_OUT, PUB_IN)
|
|
|
|
|
|
+ generate_config(n, m, t, b, PRIVATE_ROUTE, PRIV_OUT, PRIV_IN, PUB_OUT, PUB_IN, num_WN_to_precompute)
|
|
epoch_param = epoch_time_estimate(n, m, t, b)
|
|
epoch_param = epoch_time_estimate(n, m, t, b)
|
|
elif(run == "experiment"):
|
|
elif(run == "experiment"):
|
|
- num_sizes, pwn_max, epoch_max, scm_max = parse_output_logs(DIAGNOSTIC_FOLDER, experiment_name)
|
|
|
|
- print("From logs_to_csv: num_sizes = %d, pwn_max = %f, epoch_max = %f, scm_max = %f"
|
|
|
|
- % (num_sizes, pwn_max, epoch_max, scm_max))
|
|
|
|
|
|
+ #print("Waiting for 2 mins to reset sockets")
|
|
|
|
+ #time.sleep(120)
|
|
|
|
+ #num_sizes, pwn_max, epoch_max, scm_max = parse_output_logs(DIAGNOSTIC_FOLDER, experiment_name)
|
|
|
|
+ #print("From logs_to_csv: num_sizes = %d, pwn_max = %f, epoch_max = %f, scm_max = %f"
|
|
|
|
+ #% (num_sizes, pwn_max, epoch_max, scm_max))
|
|
print("\n\n Running EXPERIMENT t = %d, m = %d, n = %d \n\n" % (t, m, n))
|
|
print("\n\n Running EXPERIMENT t = %d, m = %d, n = %d \n\n" % (t, m, n))
|
|
- num_WN_to_precompute = math.ceil((num_sizes * pwn_max)/epoch_max)
|
|
|
|
- print("num_WN_to_precompute = %d" %(num_WN_to_precompute))
|
|
|
|
- if(num_WN_to_precompute < 2 * num_sizes):
|
|
|
|
- num_WN_to_precompute = 2 * num_sizes
|
|
|
|
- print("num_WN_to_precompute (pushed up to min 2 sets) = %d" %(num_WN_to_precompute))
|
|
|
|
- epoch_param = epoch_max + 2 * scm_max
|
|
|
|
|
|
+ #num_WN_to_precompute = math.ceil((num_sizes * pwn_max)/epoch_max)
|
|
|
|
+ #print("num_WN_to_precompute = %d" %(num_WN_to_precompute))
|
|
|
|
+ #if(num_WN_to_precompute < 2 * num_sizes):
|
|
|
|
+ # num_WN_to_precompute = 2 * num_sizes
|
|
|
|
+ #print("num_WN_to_precompute (pushed up to min 2 sets) = %d" %(num_WN_to_precompute))
|
|
|
|
+ #epoch_param = math.ceil(epoch_max + 10 * m * scm_max)
|
|
|
|
+ epoch_param = epoch_time_estimate(n, m, t, b)
|
|
generate_config(n, m, t, b, PRIVATE_ROUTE, PRIV_IN, PUB_OUT, PUB_IN, num_WN_to_precompute)
|
|
generate_config(n, m, t, b, PRIVATE_ROUTE, PRIV_IN, PUB_OUT, PUB_IN, num_WN_to_precompute)
|
|
|
|
|
|
# Either estimate from epoch_time_estimate for diagnostic
|
|
# Either estimate from epoch_time_estimate for diagnostic
|