commit
0efec4c406
|
@ -9,12 +9,8 @@ def plotData(conf):
|
|||
plt.clf()
|
||||
fig = plt.figure("9, 3")
|
||||
plt.grid(True)
|
||||
if conf["desLoc"] == 1:
|
||||
xDes = 0
|
||||
else:
|
||||
xDes = conf["xdots"][-1] * 0.6
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(xDes, conf["yaxismax"]/3, conf["textBox"], fontsize=10, verticalalignment='top', bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
if conf["type"] == "plot" or conf["type"] == "plot_with_1line":
|
||||
for i in range(len(conf["data"])):
|
||||
plt.plot(conf["xdots"], conf["data"][i], conf["colors"][i], label=conf["labels"][i])
|
||||
|
@ -28,10 +24,10 @@ def plotData(conf):
|
|||
plt.axhline(y = conf["expected_value2"], color='g', linestyle='--', label=conf["line_label2"])
|
||||
if conf["type"] == "plot_with_1line":
|
||||
plt.axhline(y = conf["expected_value"], color='g', linestyle='--', label=conf["line_label"])
|
||||
plt.title(conf["title"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylim(0, conf["yaxismax"]*1.1)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylim(0, conf["yaxismax"]*1.1 if conf["yaxismax"] > 0 else 1)
|
||||
plt.legend(loc=conf["legLoc"])
|
||||
plt.savefig(conf["path"], bbox_inches="tight")
|
||||
|
||||
|
@ -41,7 +37,7 @@ def plotBoxData(conf):
|
|||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
num_boxes = len(conf["data"])
|
||||
positions = np.arange(num_boxes)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.boxplot(conf["data"], patch_artist=True, showmeans=True, meanline=True, positions=positions)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
|
@ -172,8 +168,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Box Plot of Restore Row Count by Nodes"
|
||||
conf["xlabel"] = "Node Type"
|
||||
conf["ylabel"] = "Restore Row Count"
|
||||
|
@ -183,11 +181,11 @@ class Visualizor:
|
|||
data = [class1_data, class2_data]
|
||||
plt.boxplot(data)
|
||||
plt.xticks([1, 2], ['Class 1 Nodes', 'Class 2 Nodes'])
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/box_restoreRowCount.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/box_restoreRowCount.png"))
|
||||
|
||||
|
@ -196,8 +194,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Box Plot of Restore Column Count by Nodes"
|
||||
conf["xlabel"] = "Node Type"
|
||||
conf["ylabel"] = "Restore Column Count"
|
||||
|
@ -207,11 +207,11 @@ class Visualizor:
|
|||
data = [class1_data, class2_data]
|
||||
plt.boxplot(data)
|
||||
plt.xticks([1, 2], ['Class 1 Nodes', 'Class 2 Nodes'])
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/box_restoreColumnCount.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/box_restoreColumnCount.png"))
|
||||
|
||||
|
@ -220,8 +220,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Boxen Plot of Restore Row Count by Nodes"
|
||||
conf["xlabel"] = "Restore Row Count"
|
||||
conf["ylabel"] = "Nodes"
|
||||
|
@ -229,11 +231,11 @@ class Visualizor:
|
|||
data = [result.restoreRowCount[1: n1], result.restoreRowCount[n1+1: ]]
|
||||
plt.figure(figsize=(8, 6))
|
||||
sns.boxenplot(data=data, width=0.8)
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/boxen_restoreRowCount.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/boxen_restoreRowCount.png"))
|
||||
|
||||
|
@ -242,8 +244,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Boxen Plot of Restore Column Count by Nodes"
|
||||
conf["xlabel"] = "Restore Column Count"
|
||||
conf["ylabel"] = "Nodes"
|
||||
|
@ -251,11 +255,11 @@ class Visualizor:
|
|||
data = [result.restoreColumnCount[1: n1], result.restoreColumnCount[n1+1: ]]
|
||||
plt.figure(figsize=(8, 6))
|
||||
sns.boxenplot(data=data, width=0.8)
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/boxen_restoreColumnCount.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/boxen_restoreColumnCount.png"))
|
||||
|
||||
|
@ -264,8 +268,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "ECDF of Restore Row Count by Nodes"
|
||||
conf["xlabel"] = "Restore Row Count"
|
||||
conf["ylabel"] = "ECDF"
|
||||
|
@ -274,12 +280,13 @@ class Visualizor:
|
|||
class2_data = result.restoreRowCount[n1+1: ]
|
||||
sns.ecdfplot(data=class1_data, label='Class 1 Nodes')
|
||||
sns.ecdfplot(data=class2_data, label='Class 2 Nodes')
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlim(left=0, right=max(result.restoreRowCount) * 1.1)
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
max_val = max(result.restoreRowCount) * 1.1
|
||||
plt.xlim(left=0, right=max_val if max_val > 0 else 1)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1)
|
||||
plt.savefig(plotPath + "/ecdf_restoreRowCount.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/ecdf_restoreRowCount.png"))
|
||||
|
@ -289,8 +296,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "ECDF of Restore Column Count by Nodes"
|
||||
conf["xlabel"] = "Restore Column Count"
|
||||
conf["ylabel"] = "ECDF"
|
||||
|
@ -299,12 +308,13 @@ class Visualizor:
|
|||
class2_data = result.restoreColumnCount[n1+1: ]
|
||||
sns.ecdfplot(data=class1_data, label='Class 1 Nodes')
|
||||
sns.ecdfplot(data=class2_data, label='Class 2 Nodes')
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlim(left=0, right=max(result.restoreColumnCount) * 1.1)
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
max_val = max(result.restoreColumnCount) * 1.1
|
||||
plt.xlim(left=0, right=max_val if max_val > 0 else 1)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1)
|
||||
plt.savefig(plotPath + "/ecdf_restoreColumnCount.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/ecdf_restoreColumnCount.png"))
|
||||
|
@ -314,8 +324,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "ECDF of Messages Sent by Nodes"
|
||||
conf["xlabel"] = "Number of Messages Sent"
|
||||
conf["ylabel"] = "ECDF"
|
||||
|
@ -325,12 +337,12 @@ class Visualizor:
|
|||
sns.ecdfplot(data=class1_data, label='Class 1 Nodes')
|
||||
sns.ecdfplot(data=class2_data, label='Class 2 Nodes')
|
||||
plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1)
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
plt.xlim(left=0, right=max(result.msgSentCount) * 1.1)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/ecdf_messagesSent.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/ecdf_messagesSent.png"))
|
||||
|
||||
|
@ -339,8 +351,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "ECDF of Messages Received by Nodes"
|
||||
conf["xlabel"] = "Number of Messages Received"
|
||||
conf["ylabel"] = "ECDF"
|
||||
|
@ -350,12 +364,12 @@ class Visualizor:
|
|||
sns.ecdfplot(data=class1_data, label='Class 1 Nodes')
|
||||
sns.ecdfplot(data=class2_data, label='Class 2 Nodes')
|
||||
plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1)
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
plt.xlim(left=0, right=max(result.msgRecvCount) * 1.1)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/ecdf_messagesRecv.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/ecdf_messagesRecv.png"))
|
||||
|
||||
|
@ -364,8 +378,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "ECDF of Samples Received by Nodes"
|
||||
conf["xlabel"] = "Number of Samples Received"
|
||||
conf["ylabel"] = "ECDF"
|
||||
|
@ -375,37 +391,39 @@ class Visualizor:
|
|||
sns.ecdfplot(data=class1_data, label='Class 1 Nodes')
|
||||
sns.ecdfplot(data=class2_data, label='Class 2 Nodes')
|
||||
plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1)
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
plt.xlim(left=0, right=max(result.sampleRecvCount) * 1.1)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/ecdf_samplesReceived.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/ecdf_samplesReceived.png"))
|
||||
|
||||
def plotECDFRowColDist(self, result, plotPath):
|
||||
"""Plots the ECDF of row col distance by all nodes using seaborn's ecdfplot"""
|
||||
"""Plots the ECDF of row col distribution by all nodes using seaborn's ecdfplot"""
|
||||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["title"] = "ECDF of Row-Col Distance by Nodes"
|
||||
conf["xlabel"] = "Row-Col Distance"
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "ECDF of Row-Col Distribution by Nodes"
|
||||
conf["xlabel"] = "Row-Col Distribution"
|
||||
conf["ylabel"] = "ECDF"
|
||||
vector1 = result.metrics["rowDist"]
|
||||
vector2 = result.metrics["columnDist"]
|
||||
n1 = int(result.numberNodes * result.class1ratio)
|
||||
sns.ecdfplot(data=vector1, label='Rows')
|
||||
sns.ecdfplot(data=vector2, label='Columns')
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
plt.xlim(left=0, right=max(max(vector1), max(vector2)) * 1.1)
|
||||
plt.legend(labels=['Row Dist', 'Column Dist'], loc=1)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/ecdf_rowColDist.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/ecdf_rowColDist.png"))
|
||||
|
||||
|
@ -414,8 +432,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "ECDF of Samples Repaired by Nodes"
|
||||
conf["xlabel"] = "Number of Samples Repaired"
|
||||
conf["ylabel"] = "ECDF"
|
||||
|
@ -425,12 +445,12 @@ class Visualizor:
|
|||
sns.ecdfplot(data=class1_data, label='Class 1 Nodes')
|
||||
sns.ecdfplot(data=class2_data, label='Class 2 Nodes')
|
||||
plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'])
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
plt.xlim(left=0, right=max(result.repairedSampleCount) * 1.1)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/ecdf_samplesRepaired.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/ecdf_samplesRepaired.png"))
|
||||
|
||||
|
@ -439,8 +459,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Samples Received by Nodes"
|
||||
conf["xlabel"] = "Node Type"
|
||||
conf["ylabel"] = "Number of Samples Received"
|
||||
|
@ -448,11 +470,11 @@ class Visualizor:
|
|||
data = [result.sampleRecvCount[1: n1], result.sampleRecvCount[n1+1: ]]
|
||||
plt.figure(figsize=(8, 6))
|
||||
sns.boxenplot(data=data, width=0.8)
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.tight_layout()
|
||||
plt.savefig(plotPath + "/boxen_samplesRecv.png")
|
||||
plt.close()
|
||||
|
@ -463,8 +485,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Samples Repaired by Nodes"
|
||||
conf["xlabel"] = "Node Type"
|
||||
conf["ylabel"] = "Number of Samples Repaired"
|
||||
|
@ -472,11 +496,11 @@ class Visualizor:
|
|||
data = [result.repairedSampleCount[1: n1], result.repairedSampleCount[n1+1: ]]
|
||||
plt.figure(figsize=(8, 6))
|
||||
sns.boxenplot(data=data, width=0.8)
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.tight_layout()
|
||||
plt.savefig(plotPath + "/boxen_samplesRepaired.png")
|
||||
plt.close()
|
||||
|
@ -487,8 +511,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Row/Column Distribution"
|
||||
conf["xlabel"] = "Row/Column Type"
|
||||
conf["ylabel"] = "Validators Subscribed"
|
||||
|
@ -501,11 +527,11 @@ class Visualizor:
|
|||
data = [vector1, vector2]
|
||||
plt.figure(figsize=(8, 6))
|
||||
sns.boxenplot(data=data, width=0.8)
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.tight_layout()
|
||||
plt.savefig(plotPath + "/boxen_rowColDist.png")
|
||||
plt.close()
|
||||
|
@ -516,8 +542,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Messages Sent by Nodes"
|
||||
conf["xlabel"] = "Node Type"
|
||||
conf["ylabel"] = "Number of Messages Sent"
|
||||
|
@ -525,11 +553,11 @@ class Visualizor:
|
|||
data = [result.msgSentCount[1: n1], result.msgSentCount[n1+1: ]]
|
||||
labels = ["Class 1", "Class 2"]
|
||||
sns.boxenplot(data=data, palette="Set2", ax=plt.gca())
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/boxen_messagesSent.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/boxen_messagesSent.png"))
|
||||
|
||||
|
@ -538,8 +566,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Messages Received by Nodes"
|
||||
conf["xlabel"] = "Node Type"
|
||||
conf["ylabel"] = "Number of Messages Received"
|
||||
|
@ -547,11 +577,11 @@ class Visualizor:
|
|||
data = [result.msgRecvCount[1: n1], result.msgRecvCount[n1+1: ]]
|
||||
labels = ["Class 1", "Class 2"]
|
||||
sns.boxenplot(data=data, palette="Set2", ax=plt.gca())
|
||||
plt.xlabel(conf["xlabel"])
|
||||
plt.ylabel(conf["ylabel"])
|
||||
plt.title(conf["title"])
|
||||
plt.xlabel(conf["xlabel"], fontsize=12)
|
||||
plt.ylabel(conf["ylabel"], fontsize=12)
|
||||
plt.title(conf["title"], fontsize=14)
|
||||
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
|
||||
plt.text(0.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props)
|
||||
plt.savefig(plotPath + "/boxen_messagesRecv.png", bbox_inches="tight")
|
||||
print("Plot %s created." % (plotPath + "/boxen_messagesRecv.png"))
|
||||
|
||||
|
@ -560,8 +590,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Samples Repaired by Nodes"
|
||||
conf["type"] = "individual_bar"
|
||||
conf["legLoc"] = 1
|
||||
|
@ -579,8 +611,10 @@ class Visualizor:
|
|||
plt.clf()
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Row/Column Distribution"
|
||||
conf["xlabel"] = ""
|
||||
conf["ylabel"] = "Validators Subscribed"
|
||||
|
@ -600,8 +634,10 @@ class Visualizor:
|
|||
"""Plots the restoreRowCount for each node"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Restore Row Count for Each Node"
|
||||
conf["type"] = "individual_bar"
|
||||
conf["legLoc"] = 1
|
||||
|
@ -620,8 +656,10 @@ class Visualizor:
|
|||
"""Plots the restoreColumnCount for each node"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Restore Column Count for Each Node"
|
||||
conf["type"] = "individual_bar"
|
||||
conf["legLoc"] = 1
|
||||
|
@ -640,8 +678,10 @@ class Visualizor:
|
|||
"""Plots the percentage sampleRecv for each node"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Percentage of Samples Received by Nodes"
|
||||
conf["type"] = "individual_bar_with_2line"
|
||||
conf["legLoc"] = 1
|
||||
|
@ -673,8 +713,10 @@ class Visualizor:
|
|||
"""Box Plot of the sampleRecv for each node"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Samples Received by Nodes"
|
||||
conf["type"] = "individual_bar_with_2line"
|
||||
conf["legLoc"] = 1
|
||||
|
@ -692,8 +734,10 @@ class Visualizor:
|
|||
"""Plots the missing samples in the network"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Missing Samples"
|
||||
conf["type"] = "plot_with_1line"
|
||||
conf["legLoc"] = 1
|
||||
|
@ -723,8 +767,10 @@ class Visualizor:
|
|||
vector3 = [x * 100 for x in result.metrics["progress"]["samples received"]]
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Nodes/validators ready"
|
||||
conf["type"] = "plot"
|
||||
conf["legLoc"] = 2
|
||||
|
@ -755,8 +801,10 @@ class Visualizor:
|
|||
vector3[i] = (vector3[i] * 8 * (1000/self.config.stepDuration) * self.config.segmentSize) / 1000000
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Sent data"
|
||||
conf["type"] = "plot"
|
||||
conf["legLoc"] = 2
|
||||
|
@ -785,8 +833,10 @@ class Visualizor:
|
|||
vector2[i] = (vector2[i] * 8 * (1000/self.config.stepDuration) * self.config.segmentSize) / 1000000
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Received data"
|
||||
conf["type"] = "plot"
|
||||
conf["legLoc"] = 2
|
||||
|
@ -815,8 +865,10 @@ class Visualizor:
|
|||
vector2[i] = (vector2[i] * 8 * (1000/self.config.stepDuration) * self.config.segmentSize) / 1000000
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Duplicated data"
|
||||
conf["type"] = "plot"
|
||||
conf["legLoc"] = 2
|
||||
|
@ -846,8 +898,10 @@ class Visualizor:
|
|||
vector1 += [np.nan] * (len(vector2) - len(vector1))
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Row/Column distribution"
|
||||
conf["type"] = "grouped_bar"
|
||||
conf["legLoc"] = 2
|
||||
|
@ -871,8 +925,10 @@ class Visualizor:
|
|||
"""Plots the number of messages sent by all nodes"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Messages Sent by Nodes"
|
||||
conf["type"] = "individual_bar"
|
||||
conf["legLoc"] = 1
|
||||
|
@ -891,8 +947,10 @@ class Visualizor:
|
|||
"""Box Plot of the number of messages sent by all nodes"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Messages Sent by Nodes"
|
||||
conf["xlabel"] = "Node Type"
|
||||
conf["ylabel"] = "Number of Messages Sent"
|
||||
|
@ -906,8 +964,10 @@ class Visualizor:
|
|||
"""Plots the number of messages received by all nodes"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Messages Received by Nodes"
|
||||
conf["type"] = "individual_bar"
|
||||
conf["legLoc"] = 1
|
||||
|
@ -926,8 +986,10 @@ class Visualizor:
|
|||
"""Plots the number of messages received by all nodes"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Messages Received by Nodes"
|
||||
conf["type"] = "individual_bar"
|
||||
conf["legLoc"] = 1
|
||||
|
@ -947,8 +1009,10 @@ class Visualizor:
|
|||
"""Plots the number of samples repaired by all nodes"""
|
||||
conf = {}
|
||||
attrbs = self.__get_attrbs__(result)
|
||||
conf["textBox"] = "Block Size R: "+attrbs['bsrn']+"\nBlock Size C: "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']
|
||||
conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\
|
||||
+"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\
|
||||
+"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\
|
||||
+"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2']
|
||||
conf["title"] = "Number of Samples Repaired by Nodes"
|
||||
conf["type"] = "individual_bar"
|
||||
conf["legLoc"] = 1
|
||||
|
|
Loading…
Reference in New Issue