aboutsummaryrefslogtreecommitdiffstats
path: root/Metrics/Metrics-Calculation/metrics_plot/utils/GraphType.py
diff options
context:
space:
mode:
Diffstat (limited to 'Metrics/Metrics-Calculation/metrics_plot/utils/GraphType.py')
-rw-r--r--Metrics/Metrics-Calculation/metrics_plot/utils/GraphType.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Metrics/Metrics-Calculation/metrics_plot/utils/GraphType.py b/Metrics/Metrics-Calculation/metrics_plot/utils/GraphType.py
index 41054294..48d96ccc 100644
--- a/Metrics/Metrics-Calculation/metrics_plot/utils/GraphType.py
+++ b/Metrics/Metrics-Calculation/metrics_plot/utils/GraphType.py
@@ -12,6 +12,8 @@ class GraphCollection:
12 self.mpcs = [] 12 self.mpcs = []
13 self.nts = [] 13 self.nts = []
14 self.name = name 14 self.name = name
15 self.tccs = []
16 self.violations = []
15 models = reader.readmultiplefiles(path, number, shouldShuffle) 17 models = reader.readmultiplefiles(path, number, shouldShuffle)
16 print(len(models)) 18 print(len(models))
17 self.size = len(models) 19 self.size = len(models)
@@ -22,6 +24,10 @@ class GraphCollection:
22 self.mpcs.append(mpc) 24 self.mpcs.append(mpc)
23 if(constants.Node_TYPE_KEY in contents): 25 if(constants.Node_TYPE_KEY in contents):
24 self.nts.append(contents[constants.Node_TYPE_KEY]) 26 self.nts.append(contents[constants.Node_TYPE_KEY])
27 if(constants.TCC_VALUE in contents):
28 self.tccs.append(contents[constants.TCC_VALUE])
29 if(constants.VIOLATION in contents):
30 self.violations.append(contents[constants.VIOLATION][0])
25 31
26#Graph stat for one graph 32#Graph stat for one graph
27class GraphStat: 33class GraphStat:
@@ -35,4 +41,6 @@ class GraphStat:
35 self.nodeTypeStat = contents[constants.Node_TYPE_KEY] 41 self.nodeTypeStat = contents[constants.Node_TYPE_KEY]
36 if constants.VIOLATION in contents: 42 if constants.VIOLATION in contents:
37 self.violations = int(contents[constants.VIOLATION][0]) 43 self.violations = int(contents[constants.VIOLATION][0])
44 if(constants.TCC_VALUE_KEY in contents):
45 self.tcc = contents[constants.TCC_VALUE_KEY]
38 46