|
@@ -6,31 +6,20 @@ import numpy as np
|
|
|
|
|
|
def main():
|
|
def main():
|
|
perf = open("performance_stats"+".csv", "w", newline='')
|
|
perf = open("performance_stats"+".csv", "w", newline='')
|
|
-# latency = open("latency.csv", "w", newline='')
|
|
|
|
-# load = open("load.csv", "w", newline='')
|
|
|
|
-# bursty = open("burst.csv", "w",newline='')
|
|
|
|
protocols=["Open Invitation", "Trust Promotion(0->1)",
|
|
protocols=["Open Invitation", "Trust Promotion(0->1)",
|
|
"Trust Migration (0->1)", "Level Up (1->4)", "Issue Invitation",
|
|
"Trust Migration (0->1)", "Level Up (1->4)", "Issue Invitation",
|
|
"Redeem Invitation", "Check Blockage 5%", "Check Blockage 50%", "Check Blockage 100%", "Blockage Migration"]
|
|
"Redeem Invitation", "Check Blockage 5%", "Check Blockage 50%", "Check Blockage 100%", "Blockage Migration"]
|
|
- files = ["updated_levels.csv", "trust_promo.csv", "trust_mig.csv", "level2.csv",
|
|
|
|
- "issue_invites.csv", "redeem_invites.csv","checkblockage5.csv",
|
|
|
|
- "checkblockage50.csv","checkblockage100.csv","updated_blockage50.csv"]
|
|
|
|
|
|
+ files = ["trust_levels.csv", "trust_promo.csv", "trust_mig.csv", "level2.csv",
|
|
|
|
+ "issue_invites.csv", "redeem_invites.csv","check_blockage5.csv",
|
|
|
|
+ "check_blockage50.csv","check_blockage100.csv","check_blockage50.csv"]
|
|
csv_cols = ["RequestS", "RequestT","Rtstdev","ResponseS","ResponseT",
|
|
csv_cols = ["RequestS", "RequestT","Rtstdev","ResponseS","ResponseT",
|
|
"ReTstdev", "ResponseHT", "RHTstdev"]
|
|
"ReTstdev", "ResponseHT", "RHTstdev"]
|
|
perf_columns = ["Protocol","Request Size", "Request Time", "sigma",
|
|
perf_columns = ["Protocol","Request Size", "Request Time", "sigma",
|
|
"Response Size","Response Time", "sigma",
|
|
"Response Size","Response Time", "sigma",
|
|
"Response Handling Time", "sigma"]
|
|
"Response Handling Time", "sigma"]
|
|
-# lat_columns = ["Protocol", "Client Side Latency (ms)", "Users/s Response",
|
|
|
|
-# "ms/Response"]
|
|
|
|
-# load_columns = ["Protocol", "Users/core", "User/day Requests",
|
|
|
|
-# "Users/week Requests", "Users/month Requests"]
|
|
|
|
worst_resp = 0
|
|
worst_resp = 0
|
|
perfwriter = csv.writer(perf, delimiter=',')
|
|
perfwriter = csv.writer(perf, delimiter=',')
|
|
perfwriter.writerow(perf_columns)
|
|
perfwriter.writerow(perf_columns)
|
|
-# latwriter = csv.writer(latency, delimiter=',')
|
|
|
|
-# latwriter.writerow(lat_columns)
|
|
|
|
-# loadwriter = csv.writer(load, delimiter=',')
|
|
|
|
-# loadwriter.writerow(load_columns)
|
|
|
|
|
|
|
|
for i, protocol in enumerate(protocols):
|
|
for i, protocol in enumerate(protocols):
|
|
columns = ["Percent","Bridges", "RequestS", "Rsstdev", "RequestT",
|
|
columns = ["Percent","Bridges", "RequestS", "Rsstdev", "RequestT",
|
|
@@ -38,11 +27,8 @@ def main():
|
|
"ReTstdev", "ResponseHT", "RHTstdev"]
|
|
"ReTstdev", "ResponseHT", "RHTstdev"]
|
|
df = pd.read_csv(files[i], usecols=columns)
|
|
df = pd.read_csv(files[i], usecols=columns)
|
|
perf_in = []
|
|
perf_in = []
|
|
- # lat_in = []
|
|
|
|
- # req = 0.0
|
|
|
|
|
|
|
|
perf_in.append(protocol)
|
|
perf_in.append(protocol)
|
|
- # lat_in.append(protocol)
|
|
|
|
for item in csv_cols:
|
|
for item in csv_cols:
|
|
row = df[item].loc[df['Bridges']==900].values
|
|
row = df[item].loc[df['Bridges']==900].values
|
|
if "stdev" in item:
|
|
if "stdev" in item:
|
|
@@ -53,49 +39,29 @@ def main():
|
|
rounded = np.round(row[0], decimals=1)
|
|
rounded = np.round(row[0], decimals=1)
|
|
if item == "RequestT":
|
|
if item == "RequestT":
|
|
req = np.round(rounded, decimals=1)
|
|
req = np.round(rounded, decimals=1)
|
|
- # lat_in.append(req)
|
|
|
|
- # elif item == "ResponseHT":
|
|
|
|
- # lat_in[1]=np.round(req+rounded, decimals=1)
|
|
|
|
elif item == "ResponseT":
|
|
elif item == "ResponseT":
|
|
resp_sec = np.round(1000/rounded, decimals=1)
|
|
resp_sec = np.round(1000/rounded, decimals=1)
|
|
resp_core = resp_sec/(1/(60*60*24))
|
|
resp_core = resp_sec/(1/(60*60*24))
|
|
if rounded > worst_resp:
|
|
if rounded > worst_resp:
|
|
worst_resp = rounded
|
|
worst_resp = rounded
|
|
|
|
|
|
-# lat_in.append(resp_sec)
|
|
|
|
-# lat_in.append(rounded)
|
|
|
|
-
|
|
|
|
|
|
|
|
perfwriter.writerow(perf_in)
|
|
perfwriter.writerow(perf_in)
|
|
-# latwriter.writerow(lat_in)
|
|
|
|
|
|
|
|
for i, protocol in enumerate(protocols):
|
|
for i, protocol in enumerate(protocols):
|
|
columns = ["Percent","Bridges", "RequestS", "Rsstdev", "RequestT",
|
|
columns = ["Percent","Bridges", "RequestS", "Rsstdev", "RequestT",
|
|
"Rtstdev", "ResponseS","Restdev","ResponseT",
|
|
"Rtstdev", "ResponseS","Restdev","ResponseT",
|
|
"ReTstdev", "ResponseHT", "RHTstdev"]
|
|
"ReTstdev", "ResponseHT", "RHTstdev"]
|
|
df = pd.read_csv(files[i], usecols=columns)
|
|
df = pd.read_csv(files[i], usecols=columns)
|
|
-# load_in = []
|
|
|
|
-# load_in.append(protocol)
|
|
|
|
row = df['ResponseT'].loc[df['Bridges']==900].values
|
|
row = df['ResponseT'].loc[df['Bridges']==900].values
|
|
rounded = np.round(row[0], decimals=3)
|
|
rounded = np.round(row[0], decimals=3)
|
|
resp_sec = np.round(1000/rounded, decimals=3)
|
|
resp_sec = np.round(1000/rounded, decimals=3)
|
|
resp_core = int(resp_sec/(1/(60*60*24)))
|
|
resp_core = int(resp_sec/(1/(60*60*24)))
|
|
-# load_in.append(resp_core)
|
|
|
|
if worst_resp > rounded:
|
|
if worst_resp > rounded:
|
|
secs = int(worst_resp/1000)
|
|
secs = int(worst_resp/1000)
|
|
-# load_in.append(resp_core*secs)
|
|
|
|
-# load_in.append(resp_core*7*secs)
|
|
|
|
-# load_in.append(resp_core*30*secs)
|
|
|
|
- # else:
|
|
|
|
- # load_in.append(resp_core)
|
|
|
|
- # load_in.append(resp_core*7)
|
|
|
|
- # load_in.append(resp_core*30)
|
|
|
|
- # loadwriter.writerow(load_in)
|
|
|
|
|
|
|
|
perf.close()
|
|
perf.close()
|
|
-# latency.close()
|
|
|
|
-# load.close()
|
|
|
|
- print("\nDone Tables.\nTable data output to: performance_stats.csv,\n")# latency.csv, load.csv\n")
|
|
|
|
|
|
+ print("\nDone Tables.\nTable data output to: performance_stats.csv,\n")
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if __name__ == "__main__":
|