You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: parsoda/model/social_data_app.py
+106-13
Original file line number
Diff line number
Diff line change
@@ -44,49 +44,124 @@ def __init__(
44
44
45
45
self.__reduce_result_length=reduce_result_length
46
46
47
-
defget_app_name(self):
47
+
defget_app_name(self)->str:
48
+
"""Gets the referred application name
49
+
50
+
Returns:
51
+
str: the app name
52
+
"""
48
53
returnself.__app_name
49
54
50
-
defget_driver(self):
55
+
defget_driver(self)->ParsodaDriver:
56
+
"""Gets the driver used by the application
57
+
58
+
Returns:
59
+
ParsodaDriver: the driver object
60
+
"""
51
61
returnself.__driver
52
62
53
-
defget_partitions(self):
63
+
defget_partitions(self)->int:
64
+
"""Gets the number of partitions used during execution
65
+
66
+
Returns:
67
+
int: number of partitions
68
+
"""
54
69
returnself.__partitions
55
70
56
-
defget_chunk_size(self):
71
+
defget_chunk_size(self)->int:
72
+
"""Gets the data chunk size, i.e. the partitoin size, used during execution
73
+
74
+
Returns:
75
+
int: data chunck size
76
+
"""
57
77
returnself.__chunk_size
58
78
59
-
defget_crawling_time(self):
79
+
defget_crawling_time(self)->float:
80
+
"""Gets the time spent on crawling
81
+
82
+
Returns:
83
+
float: the crawling time in seconds
84
+
"""
60
85
returnself.__crawling_time
61
86
62
-
defget_filter_time(self):
87
+
defget_filter_time(self)->float:
88
+
"""Gets the time spent on filtering
89
+
90
+
Returns:
91
+
float: the filter time in seconds
92
+
"""
63
93
returnself.__filter_time
64
94
65
-
defget_map_time(self):
95
+
defget_map_time(self)->float:
96
+
"""Gets the time spent on mapping
97
+
98
+
Returns:
99
+
float: the map time in seconds
100
+
"""
66
101
returnself.__map_time
67
102
68
-
defget_split_time(self):
103
+
defget_split_time(self)->float:
104
+
"""Gets the time spent on splitting
105
+
106
+
Returns:
107
+
float: the split time in seconds
108
+
"""
69
109
returnself.__split_time
70
110
71
-
defget_reduce_time(self):
111
+
defget_reduce_time(self)->float:
112
+
"""Gets the time spent on reduction
113
+
114
+
Returns:
115
+
float: the reduce time in seconds
116
+
"""
72
117
returnself.__reduce_time
73
118
74
-
defget_analysis_time(self):
119
+
defget_analysis_time(self)->float:
120
+
"""Gets the time spent on analysis
121
+
122
+
Returns:
123
+
float: the analysis time in seconds
124
+
"""
75
125
returnself.__analysis_time
76
126
77
-
defget_visualization_time(self):
127
+
defget_visualization_time(self)->float:
128
+
"""Gets the time spent on visualization
129
+
130
+
Returns:
131
+
float: the visualization time in seconds
132
+
"""
78
133
returnself.__visualization_time
79
134
80
-
defget_total_execution_time(self):
135
+
defget_parallel_execution_time(self)->float:
136
+
"""Gets the time spent on parallel execution, i.e. the time spent from filtering to reduction.
137
+
138
+
Returns:
139
+
float: the parallel execution time
140
+
"""
81
141
returnself.__filter_to_reduce_time
82
142
83
-
defget_total_execution_time(self):
143
+
defget_total_execution_time(self)->float:
144
+
"""Gets the time spent on execution, from filtering to visualization, excluding the crawling step
145
+
146
+
Returns:
147
+
float: the total execution time in seconds
148
+
"""
84
149
returnself.__total_execution_time
85
150
86
151
defget_total_time(self):
152
+
"""Gets the total time spent for completing the application, from crawling to visualization, i.e. the response time
153
+
154
+
Returns:
155
+
float: the total response time
156
+
"""
87
157
returnself.__total_time
88
158
89
159
defget_reduce_result_length(self):
160
+
"""Gets the number of items obtained by executing the reduction. This value can be used for debbugging purposes and for testing the correctness of the parallel execution.
161
+
162
+
Returns:
163
+
float: the length of the reduction result
164
+
"""
90
165
returnself.__reduce_result_length
91
166
92
167
def__repr__(self):
@@ -117,6 +192,14 @@ def __str__(self):
117
192
"| Reduce result length: "+str(self.__reduce_result_length) +"\n"
118
193
119
194
defto_csv_line(self, separator: str=";") ->str:
195
+
"""Creates a CSV (Comma Separated Value) line for this report, by using the specified separator
196
+
197
+
Args:
198
+
separator (str, optional): The values separator. Defaults to ";".
0 commit comments