OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 import argparse | 2 import argparse |
3 import json | 3 import json |
4 import logging | 4 import logging |
5 import os | 5 import os |
6 from threading import Thread | 6 from threading import Thread |
7 import time | 7 import time |
8 | 8 |
9 import api as api | 9 import api as api |
10 import cli as cli | 10 import cli as cli |
11 import pytools.experiments.job_generator as jobgen | 11 import pytools.experiments.job_generator as jobgen |
12 from common.lx3.common import get_config_json | 12 from common.lx3.common import get_config_json |
13 from mn.mn_launcher import mn_start, get_mininet_flags | 13 from mn.mn_launcher import mn_start, get_mininet_flags |
14 from pytools.common.common import print_generic_exception | 14 from pytools.common.common import print_generic_exception |
15 from pytools.ycsb.ycsb_runner import generate_sub_exp_folder_based_on_args | 15 from pytools.ycsb.ycsb_runner import generate_sub_exp_folder_based_on_args |
16 from utils.create_data_folder import create_folder | 16 from utils.create_data_folder import create_folder |
17 from utils.execute_ping_nodes_generate_output import \ | 17 from utils.execute_ping_nodes_generate_output import \ |
18 execute_ping_nodes_generate_output | 18 execute_ping_nodes_generate_output |
19 from utils.plot_results_from_ping import plot_ping_results | 19 from utils.plot_results_from_ping import plot_ping_results |
20 from utils.ds_score_plots.fetch_score_and_write_to_csv import \ | |
21 fetch_data_from_log_and_write_to_csv | |
22 from utils.ds_score_plots.plot_time_vs_score import \ | |
23 plot_score_data | |
24 | |
25 from utils.experiments.read_yscb_data_from_folder import \ | 20 from utils.experiments.read_yscb_data_from_folder import \ |
26 get_yscb_data_from_folder | 21 get_yscb_data_from_folder |
| 22 |
27 from utils.experiments.write_results_to_csv import write_results_dict_to_csv | 23 from utils.experiments.write_results_to_csv import write_results_dict_to_csv |
| 24 |
| 25 from utils.ds_score_plots.extract_data_from_log_file import extract_data_from_lo
g_cas |
| 26 from utils.ds_score_plots.extract_data_from_log_file import extract_data_from_lo
g_cas_jitter |
| 27 from utils.ds_score_plots.plot_both_score_jitter import plot_both_score_jitter |
| 28 from utils.ds_score_plots.plot_correlate_score_vs_time import plot_score_data |
| 29 from utils.ds_score_plots.plot_correlate_score_vs_time import plot_score_data_ji
tter |
| 30 |
| 31 from utils.ds_score_plots.copy_ping_latency_data_to_unique_folder import copy_pi
ng_result_files |
| 32 from utils.ds_score_plots.plot_both_socre_latency import plot_both_score_and_lat
ency |
| 33 from utils.ds_score_plots.plot_latency_host_to_host import plot_host_to_host_lat
ency |
| 34 from utils.ds_score_plots.plot_jitter_host_to_host import plot_host_to_host_jitt
er |
| 35 |
28 from utils.slack.slack_notification import generate_slack_notifications | 36 from utils.slack.slack_notification import generate_slack_notifications |
| 37 from compare_snitches_plot import plot_for_all_snitches_from_csv_file |
29 | 38 |
30 logging.basicConfig(format="%(filename).7s.py (%(funcName).5s):[%(lineno)4d] %(a
sctime)s %(levelname)7s || %(message)s", | 39 |
31 datefmt='%H:%M:%S', level=logging.DEBUG) | 40 logging.basicConfig( |
| 41 format= |
| 42 "%(filename).7s.py (%(funcName).5s):[%(lineno)4d] %(asctime)s %(levelname)7s
|| %(message)s", |
| 43 datefmt='%H:%M:%S', |
| 44 level=logging.DEBUG) |
32 | 45 |
33 | 46 |
34 def adjust_by_flags(FLAGS, conf): | 47 def adjust_by_flags(FLAGS, conf): |
35 if FLAGS.setup_only: | 48 if FLAGS.setup_only: |
36 conf["cassandra"]["setup"]["cas_copy"] = True | 49 conf["cassandra"]["setup"]["cas_copy"] = True |
37 conf["cassandra"]["setup"]["cas_cfg"] = True | 50 conf["cassandra"]["setup"]["cas_cfg"] = True |
38 conf["cassandra"]["setup"]["cas_rm_data"] = True | 51 conf["cassandra"]["setup"]["cas_rm_data"] = True |
39 conf["cassandra"]["setup"]["cas_run_experiment"] = False | 52 conf["cassandra"]["setup"]["cas_run_experiment"] = False |
40 | 53 |
41 return conf | 54 return conf |
42 | 55 |
43 def run_multiconf_experiments(FLAGS, conf, unique_exp_folder): | 56 |
| 57 def write_exp_config_to_exp_folder(exp_folder, conf): |
| 58 with open(os.path.join(exp_folder, 'exp_config.json'), 'w') as f: |
| 59 json.dump(conf, f, indent=4) |
| 60 |
| 61 |
| 62 def run_multiconf_experiments(FLAGS, conf, unique_exp_folder, only_jitter=True): |
44 """ | 63 """ |
45 Run multiconf experiments | 64 Run multiconf experiments |
46 --> use latest conf.json version for it to work | 65 --> use latest conf.json version for it to work |
47 :param FLAGS: | 66 :param FLAGtS: |
48 :param conf: | 67 :param conf: |
49 """ | 68 """ |
50 if FLAGS.repeat > 0: | 69 if FLAGS.repeat > 0: |
51 conf["cassandra"]["exp"]["repeat"] = FLAGS.repeat | 70 conf["cassandra"]["exp"]["repeat"] = FLAGS.repeat |
52 | 71 |
53 # Do initial setting up testbed here | 72 # Do initial setting up testbed here |
54 net = setup_testbed(FLAGS, conf, launch_system=True) | 73 net = setup_testbed(FLAGS, conf, launch_system=True) |
55 # Load YCSB stuff to the keyspace | 74 # Load YCSB stuff to the keyspace |
56 api.experiment_setup_keyspace(FLAGS, conf, net=net) | 75 api.experiment_setup_keyspace(FLAGS, conf, net=net) |
57 | 76 |
58 # Run experiments one after other | |
59 print("######################################################") | |
60 print("Muliconf multi thread experiment started") | |
61 run_multiconf_threads_and_plot( | |
62 FLAGS, conf, net=net, unique_exp_folder=unique_exp_folder | |
63 ) | |
64 print("Muliconf multi thread experiment finished") | |
65 print("######################################################") | |
66 print("######################################################") | |
67 print("Muliconf multi sleep time experiment started") | |
68 run_multiconf_sleep_time( | |
69 FLAGS, conf, net=net, unique_exp_folder=unique_exp_folder | |
70 ) | |
71 print("Muliconf multi sleep time experiment finished") | |
72 print("######################################################") | |
73 print("######################################################") | 77 print("######################################################") |
74 print("Muliconf multi jitter experiment started") | 78 print("Muliconf multi jitter experiment started") |
75 run_multiconf_jitter( | 79 run_multiconf_jitter( |
76 FLAGS, conf, net=net, unique_exp_folder=unique_exp_folder, | 80 FLAGS, |
77 distribution=FLAGS.distribution | 81 conf, |
78 ) | 82 net=net, |
| 83 unique_exp_folder=unique_exp_folder, |
| 84 distribution=FLAGS.distribution) |
79 print("Muliconf multi jitter experiment finished") | 85 print("Muliconf multi jitter experiment finished") |
80 print("######################################################") | 86 print("######################################################") |
| 87 if not only_jitter: |
| 88 # Run experiments one after other |
| 89 print("######################################################") |
| 90 print("Muliconf multi thread experiment started") |
| 91 run_multiconf_threads_and_plot( |
| 92 FLAGS, conf, net=net, unique_exp_folder=unique_exp_folder) |
| 93 print("Muliconf multi thread experiment finished") |
| 94 print("######################################################") |
| 95 print("######################################################") |
| 96 print("Muliconf multi sleep time experiment started") |
| 97 run_multiconf_sleep_time( |
| 98 FLAGS, conf, net=net, unique_exp_folder=unique_exp_folder) |
| 99 print("Muliconf multi sleep time experiment finished") |
| 100 print("######################################################") |
81 | 101 |
82 | 102 |
83 def run_multiconf_experiments_with_every_snitch(FLAGS, conf): | 103 |
| 104 def run_multiconf_experiments_with_every_snitch(FLAGS, conf, only_jitter=True): |
84 """ | 105 """ |
85 Run multiconf experiments with every | 106 Run multiconf experiments with every |
86 snitch version | 107 snitch version |
87 --> use latest conf.json version for it to work | 108 --> use latest conf.json version for it to work |
88 :param FLAGS: | 109 :param FLAGS: |
89 :param conf: | 110 :param conf: |
90 """ | 111 """ |
91 # Dynamic Snitch multiconf experiments | 112 # Dynamic Snitch multiconf experiments |
92 conf["cassandra"]["config_items"]["dynamic_snitch"] = True | 113 conf["cassandra"]["config_items"]["dynamic_snitch"] = True |
93 conf["cassandra"]["config_items"]["fairgame_snitch"] = False | 114 conf["cassandra"]["config_items"]["fairgame_snitch"] = False |
94 conf["cassandra"]["config_items"]["omnipotent_snitch"] = False | 115 conf["cassandra"]["config_items"]["omnipotent_snitch"] = False |
| 116 conf["notify_cassandra"] = False |
95 | 117 |
96 print("<-------------------------------------------------------->") | 118 print("<-------------------------------------------------------->") |
97 print("Dynamic Snitch muliconf experiment started") | 119 print("Dynamic Snitch muliconf experiment started") |
98 dynamic_snitch_exp_folder = create_experiment_folders("dynamic_snitch") | 120 dynamic_snitch_exp_folder = create_experiment_folders("dynamic_snitch") |
99 run_multiconf_experiments(FLAGS, conf, dynamic_snitch_exp_folder) | 121 run_multiconf_experiments(FLAGS, conf, dynamic_snitch_exp_folder, only_jitte
r) |
100 print("<-------------------------------------------------------->") | 122 print("<-------------------------------------------------------->") |
101 | 123 |
102 # Omnipotent Snitch multiconf experiments | 124 # Omnipotent Snitch multiconf experiments |
103 conf["cassandra"]["config_items"]["dynamic_snitch"] = False | 125 conf["cassandra"]["config_items"]["dynamic_snitch"] = False |
104 conf["cassandra"]["config_items"]["fairgame_snitch"] = False | 126 conf["cassandra"]["config_items"]["fairgame_snitch"] = False |
105 conf["cassandra"]["config_items"]["omnipotent_snitch"] = True | 127 conf["cassandra"]["config_items"]["omnipotent_snitch"] = True |
| 128 conf["notify_cassandra"] = True |
106 | 129 |
107 print("<-------------------------------------------------------->") | 130 print("<-------------------------------------------------------->") |
108 print("Omnipotent Snitch muliconf experiment started") | 131 print("Omnipotent Snitch muliconf experiment started") |
109 omnipotent_snitch_exp_folder = create_experiment_folders("omnipotent_snitch
") | 132 omnipotent_snitch_exp_folder = create_experiment_folders( |
110 run_multiconf_experiments(FLAGS, conf, omnipotent_snitch_exp_folder) | 133 "omnipotent_snitch") |
| 134 run_multiconf_experiments(FLAGS, conf, omnipotent_snitch_exp_folder, only_ji
tter) |
111 print("<-------------------------------------------------------->") | 135 print("<-------------------------------------------------------->") |
112 | 136 |
113 # Fairgame Snitch multiconf experiments | 137 # Fairgame Snitch multiconf experiments |
114 conf["cassandra"]["config_items"]["dynamic_snitch"] = False | 138 conf["cassandra"]["config_items"]["dynamic_snitch"] = False |
115 conf["cassandra"]["config_items"]["fairgame_snitch"] = True | 139 conf["cassandra"]["config_items"]["fairgame_snitch"] = True |
116 conf["cassandra"]["config_items"]["omnipotent_snitch"] = False | 140 conf["cassandra"]["config_items"]["omnipotent_snitch"] = False |
| 141 conf["notify_cassandra"] = False |
| 142 |
117 | 143 |
118 print("<-------------------------------------------------------->") | 144 print("<-------------------------------------------------------->") |
119 print("Fairgame Snitch muliconf experiment started") | 145 print("Fairgame Snitch muliconf experiment started") |
120 fairgame_snitch_exp_folder = create_experiment_folders("fairgame_snitch") | 146 fairgame_snitch_exp_folder = create_experiment_folders("fairgame_snitch") |
121 run_multiconf_experiments(FLAGS, conf, fairgame_snitch_exp_folder) | 147 run_multiconf_experiments(FLAGS, conf, fairgame_snitch_exp_folder, only_jitt
er) |
122 print("<-------------------------------------------------------->") | 148 print("<-------------------------------------------------------->") |
123 | 149 |
| 150 plot_for_all_snitches_from_csv_file( |
| 151 os.path.join(dynamic_snitch_exp_folder, 'Varying_jitter_levels.csv'), |
| 152 os.path.join(omnipotent_snitch_exp_folder, 'Varying_jitter_levels.csv'), |
| 153 os.path.join(fairgame_snitch_exp_folder, 'Varying_jitter_levels.csv'), |
| 154 label='99th percentile of DS, OS and FS tail latency at varying congesti
on levels', |
| 155 where_to_save_plot=os.path.join(conf["env"]["out_exp_dir"], 'plot_data') |
| 156 ) |
| 157 |
124 | 158 |
125 def execute_args_workloads(FLAGS, conf, net): | 159 def execute_args_workloads(FLAGS, conf, net): |
126 for w in FLAGS.workloads: | 160 for w in FLAGS.workloads: |
127 try: | 161 try: |
128 wcfg = get_config_json(w) | 162 wcfg = get_config_json(w) |
129 cfgs = jobgen.generate_jobs_configs_from_json( | 163 cfgs = jobgen.generate_jobs_configs_from_json( |
130 wcfg, FLAGS.properties, FLAGS.ranges) | 164 wcfg, FLAGS.properties, FLAGS.ranges) |
131 | 165 |
132 for c in cfgs: | 166 for c in cfgs: |
133 exp_name = "wl.%s_arg.%s_%s" % ( | 167 exp_name = "wl.%s_arg.%s_%s" % (os.path.basename(w), |
134 os.path.basename(w), c["job_short_id"], FLAGS.comment) | 168 c["job_short_id"], |
| 169 FLAGS.comment) |
135 exp_name = exp_name.replace("/", ".") | 170 exp_name = exp_name.replace("/", ".") |
136 if FLAGS.repeat > 0: | 171 if FLAGS.repeat > 0: |
137 c["cassandra"]["exp"]["repeat"] = FLAGS.repeat | 172 c["cassandra"]["exp"]["repeat"] = FLAGS.repeat |
138 | 173 |
139 api.experiment_run(FLAGS, c, net, exp_name) | 174 api.experiment_run(FLAGS, c, net, exp_name) |
140 | 175 |
141 except: | 176 except: |
142 print_generic_exception() | 177 print_generic_exception() |
143 | 178 |
144 | 179 |
(...skipping 19 matching lines...) Expand all Loading... |
164 | 199 |
165 score_data_folder = os.path.join(plot_data_folder, 'score_data') | 200 score_data_folder = os.path.join(plot_data_folder, 'score_data') |
166 create_folder(score_data_folder) | 201 create_folder(score_data_folder) |
167 | 202 |
168 return | 203 return |
169 | 204 |
170 | 205 |
171 def set_default_test_bed_state(FLAGS, conf, net, round_repeat=False): | 206 def set_default_test_bed_state(FLAGS, conf, net, round_repeat=False): |
172 # Standard defaults | 207 # Standard defaults |
173 api.execute_const_update_jitter( | 208 api.execute_const_update_jitter( |
174 FLAGS, conf, net, jitter_level=2, distribution="normal" | 209 FLAGS, conf, net, jitter_level=2, distribution="normal") |
175 ) | |
176 conf['workload_1']['threads'] = 256 # Default | 210 conf['workload_1']['threads'] = 256 # Default |
177 conf['workload_1']['p_recordcount'] = 10000 | 211 conf['workload_1']['p_recordcount'] = 10000 |
178 conf['workload_1']['p_operationcount'] = 10000 | 212 conf['workload_1']['p_operationcount'] = 10000 |
179 return conf | 213 return conf |
180 | 214 |
181 | 215 |
182 def run_multiconf_threads_and_plot(FLAGS, conf, net, unique_exp_folder): | 216 def run_multiconf_threads_and_plot(FLAGS, conf, net, unique_exp_folder): |
183 """ | 217 """ |
184 Run experiment with varying YCSB thread loads and draw plots (1.5) | 218 Run experiment with varying YCSB thread loads and draw plots (1.5) |
185 :param FLAGS: | 219 :param FLAGS: |
(...skipping 11 matching lines...) Expand all Loading... |
197 result_for_thread = { | 231 result_for_thread = { |
198 'label': 'thread count', | 232 'label': 'thread count', |
199 'key': thread_count, | 233 'key': thread_count, |
200 'result': None | 234 'result': None |
201 } | 235 } |
202 conf['workload_1']['threads'] = thread_count | 236 conf['workload_1']['threads'] = thread_count |
203 output_folder = api.experiment_run(FLAGS, conf, net) | 237 output_folder = api.experiment_run(FLAGS, conf, net) |
204 print("**********************************************************") | 238 print("**********************************************************") |
205 print( | 239 print( |
206 "Experiments finished for: {0} threads, and output at: {1}".format( | 240 "Experiments finished for: {0} threads, and output at: {1}".format( |
207 thread_count, output_folder | 241 thread_count, output_folder)) |
208 ) | |
209 ) | |
210 print("**********************************************************") | 242 print("**********************************************************") |
211 | 243 |
212 # store intermediate results | 244 # store intermediate results |
213 result_for_thread['result'] = get_yscb_data_from_folder( | 245 result_for_thread['result'] = get_yscb_data_from_folder(output_folder) |
214 output_folder | |
215 ) | |
216 thread_count_results.append(result_for_thread) | 246 thread_count_results.append(result_for_thread) |
217 | 247 |
218 write_results_dict_to_csv( | 248 write_results_dict_to_csv( |
219 results_dict=thread_count_results, | 249 results_dict=thread_count_results, |
220 location=unique_exp_folder, | 250 location=unique_exp_folder, |
221 filename='Varying_thread_loads_levels.csv' | 251 filename='Varying_thread_loads_levels.csv') |
222 ) | |
223 # All tests are finished at this point | 252 # All tests are finished at this point |
224 api.get_ycsb_plot_from_list( | 253 api.get_ycsb_plot_from_list( |
225 os.path.join( | 254 os.path.join(unique_exp_folder, 'Varying_thread_loads_levels.csv'), |
226 unique_exp_folder, 'Varying_thread_loads_levels.csv' | 255 where_to_save=unique_exp_folder, |
227 ), where_to_save=unique_exp_folder, | 256 label="Varying thread load effects") |
228 label="Varying thread load effects" | |
229 ) | |
230 return | 257 return |
231 | 258 |
232 | 259 |
233 def run_multiconf_sleep_time(FLAGS, conf, net, unique_exp_folder): | 260 def run_multiconf_sleep_time(FLAGS, |
| 261 conf, |
| 262 net, |
| 263 unique_exp_folder, |
| 264 use_jitter=False): |
234 """ | 265 """ |
235 Run experiment with varying sleep times and draw plots (1.5) | 266 Run experiment with varying sleep times and draw plots (1.5) |
236 :param FLAGS: | 267 :param FLAGS: |
237 :param conf: | 268 :param conf: |
238 :return: | 269 :return: |
239 """ | 270 """ |
240 # We need the folders where these outputs are stored | 271 # We need the folders where these outputs are stored |
241 output_folder = None | 272 output_folder = None |
242 sleep_time_results = [] | 273 sleep_time_results = [] |
243 | 274 |
244 # This would set the defaults | 275 # This would set the defaults |
245 conf = set_default_test_bed_state(FLAGS, conf, net) | 276 conf = set_default_test_bed_state(FLAGS, conf, net) |
246 for sleep_time in conf['multiconf_sleep_time']: | 277 for sleep_time in conf['multiconf_sleep_time']: |
247 result_for_sleep_time = { | 278 result_for_sleep_time = { |
248 'label': 'sleep time', | 279 'label': 'sleep time', |
249 'key': sleep_time, | 280 'key': sleep_time, |
250 'result': None | 281 'result': None |
251 } | 282 } |
252 # Execute latency change with different sleep times | 283 # Execute latency change with different sleep times |
253 thread = Thread( | 284 thread = Thread( |
254 target=api.execute_update_latencies, | 285 target=api.execute_update_latencies, |
255 args=(FLAGS, conf, net, sleep_time) | 286 args=(FLAGS, conf, net, sleep_time, use_jitter)) |
256 ) | |
257 thread.start() | 287 thread.start() |
258 output_folder = api.experiment_run(FLAGS, conf, net) | 288 output_folder = api.experiment_run(FLAGS, conf, net) |
259 | 289 |
260 print("**********************************************************") | 290 print("**********************************************************") |
261 print( | 291 print( |
262 "Experiments finished for: {0} sleep time, output at: {1}".format( | 292 "Experiments finished for: {0} sleep time, output at: {1}".format( |
263 sleep_time, output_folder | 293 sleep_time, output_folder)) |
264 ) | |
265 ) | |
266 print("**********************************************************") | 294 print("**********************************************************") |
267 | 295 |
268 thread.join() | 296 thread.join() |
269 | 297 |
270 # store intermediate results | 298 # store intermediate results |
271 result_for_sleep_time['result'] = get_yscb_data_from_folder( | 299 result_for_sleep_time['result'] = get_yscb_data_from_folder( |
272 output_folder | 300 output_folder) |
273 ) | |
274 sleep_time_results.append(result_for_sleep_time) | 301 sleep_time_results.append(result_for_sleep_time) |
275 | 302 |
276 write_results_dict_to_csv( | 303 write_results_dict_to_csv( |
277 results_dict=sleep_time_results, | 304 results_dict=sleep_time_results, |
278 location=unique_exp_folder, | 305 location=unique_exp_folder, |
279 filename='Varying_latency_frequency_levels.csv' | 306 filename='Varying_latency_frequency_levels.csv') |
280 ) | 307 |
| 308 write_exp_config_to_exp_folder(unique_exp_folder, conf) |
281 | 309 |
282 # All tests are finished at this point | 310 # All tests are finished at this point |
283 api.get_ycsb_plot_from_list( | 311 api.get_ycsb_plot_from_list( |
284 os.path.join( | 312 os.path.join(unique_exp_folder, |
285 unique_exp_folder, 'Varying_latency_frequency_levels.csv' | 313 'Varying_latency_frequency_levels.csv'), |
286 ), | |
287 where_to_save=unique_exp_folder, | 314 where_to_save=unique_exp_folder, |
288 label="Varying sleep frequency changes effects" | 315 label="Varying sleep frequency changes effects") |
289 ) | |
290 | 316 |
291 | 317 |
292 def run_constant_latency_and_jitter_exp( | 318 def run_constant_latency_and_jitter_exp(FLAGS, |
293 FLAGS, conf, net, jitter, latency, distribution='normal' | 319 conf, |
294 ): | 320 net, |
| 321 jitter, |
| 322 latency, |
| 323 distribution='normal'): |
295 """ | 324 """ |
296 Run exp with worst case latency and jitter | 325 Run exp with worst case latency and jitter |
297 :param FLAGS: | 326 :param FLAGS: |
298 :param conf: | 327 :param conf: |
299 :param net: | 328 :param net: |
300 :return: | 329 :return: |
301 """ | 330 """ |
302 | 331 |
303 api.execute_const_update_jitter( | 332 api.execute_const_update_jitter( |
304 FLAGS, conf, net, jitter_level=jitter, distribution=distribution, | 333 FLAGS, |
305 latency=latency | 334 conf, |
306 ) | 335 net, |
| 336 jitter_level=jitter, |
| 337 distribution=distribution, |
| 338 latency=latency) |
307 return api.experiment_run(FLAGS, conf, net) | 339 return api.experiment_run(FLAGS, conf, net) |
308 | 340 |
309 | 341 |
310 def run_multiconf_propagation_delta_fs( | 342 def run_multiconf_propagation_delta_fs(FLAGS, |
311 FLAGS, conf, net, jitter, latency, distribution='normal', | 343 conf, |
312 unique_exp_folder=None | 344 net, |
313 ): | 345 jitter, |
| 346 latency, |
| 347 distribution='normal', |
| 348 unique_exp_folder=None): |
314 prop_delta_min = conf['multiconf_propagation_delta']['min'] | 349 prop_delta_min = conf['multiconf_propagation_delta']['min'] |
315 prop_delta_max = conf['multiconf_propagation_delta']['max'] | 350 prop_delta_max = conf['multiconf_propagation_delta']['max'] |
316 delta_conf_results = [] | 351 delta_conf_results = [] |
317 for delta in range(prop_delta_min, prop_delta_max): | 352 for delta in range(prop_delta_min, prop_delta_max): |
318 result_for_delta = { | 353 result_for_delta = { |
319 'label': 'Propogation delta', | 354 'label': 'Propogation delta', |
320 'key': delta, | 355 'key': delta, |
321 'result': None | 356 'result': None |
322 } | 357 } |
323 api.execute_const_update_jitter( | 358 api.execute_const_update_jitter( |
324 FLAGS, conf, net, jitter_level=jitter, distribution=distribution, | 359 FLAGS, |
325 latency=latency | 360 conf, |
326 ) | 361 net, |
| 362 jitter_level=jitter, |
| 363 distribution=distribution, |
| 364 latency=latency) |
327 conf['cassandra']['config_items']['fairgame_snitch_propagation_delta']\ | 365 conf['cassandra']['config_items']['fairgame_snitch_propagation_delta']\ |
328 = delta | 366 = delta |
329 | 367 |
330 output_folder = api.experiment_run(FLAGS, conf, net) | 368 output_folder = api.experiment_run(FLAGS, conf, net) |
331 print("**********************************************************") | 369 print("**********************************************************") |
332 print( | 370 print( |
333 "Experiments finished for: {0} propogation delta, and output at: " | 371 "Experiments finished for: {0} propogation delta, and output at: " |
334 "{1}".format(delta, output_folder) | 372 "{1}".format(delta, output_folder)) |
335 ) | |
336 print("**********************************************************") | 373 print("**********************************************************") |
337 | 374 |
338 result_for_delta['result'] = get_yscb_data_from_folder(output_folder) | 375 result_for_delta['result'] = get_yscb_data_from_folder(output_folder) |
339 delta_conf_results.append(result_for_delta) | 376 delta_conf_results.append(result_for_delta) |
340 | 377 |
| 378 write_exp_config_to_exp_folder(unique_exp_folder, conf) |
| 379 |
341 write_results_dict_to_csv( | 380 write_results_dict_to_csv( |
342 results_dict=delta_conf_results, location=unique_exp_folder, | 381 results_dict=delta_conf_results, |
343 filename='Varying_propagation_delta_fs_score.csv' | 382 location=unique_exp_folder, |
344 ) | 383 filename='Varying_propagation_delta_fs_score.csv') |
345 | 384 |
346 # All tests are finished at this point | 385 # All tests are finished at this point |
347 api.get_ycsb_plot_from_list( | 386 api.get_ycsb_plot_from_list( |
348 os.path.join( | 387 os.path.join(unique_exp_folder, |
349 unique_exp_folder, 'Varying_propagation_delta_fs_score.csv' | 388 'Varying_propagation_delta_fs_score.csv'), |
350 ), | |
351 where_to_save=unique_exp_folder, | 389 where_to_save=unique_exp_folder, |
352 label="Varying propagation delta effects" | 390 label="Varying propagation delta effects") |
353 ) | |
354 | 391 |
355 | 392 |
356 def run_multiconf_jitter(FLAGS, conf, net, unique_exp_folder, distribution): | 393 def run_multiconf_jitter(FLAGS, conf, net, unique_exp_folder, distribution): |
357 """ | 394 """ |
358 Run experiment with varying Jitter levels and draw plots (1.5) | 395 Run experiment with varying Jitter levels and draw plots (1.5) |
359 :param FLAGS: | 396 :param FLAGS: |
360 :param conf: | 397 :param conf: |
361 :return: | 398 :return: |
362 """ | 399 """ |
363 # We need the folders where these outputs are stored | 400 # We need the folders where these outputs are stored |
364 output_folder = None | 401 output_folder = None |
365 jitter_level_results = [] | 402 jitter_level_results = [] |
366 | 403 |
367 # This would set the defaults | 404 # This would set the defaults |
368 conf = set_default_test_bed_state(FLAGS, conf, net) | 405 conf = set_default_test_bed_state(FLAGS, conf, net) |
369 for jitter_level in conf['multiconf_jitter_levels']: | 406 for jitter_level in conf['multiconf_jitter_levels']: |
370 result_for_jitter = { | 407 result_for_jitter = { |
371 'label': 'jitter level', | 408 'label': 'jitter level', |
372 'key': jitter_level, | 409 'key': jitter_level, |
373 'result': None | 410 'result': None |
374 } | 411 } |
375 # Modify jitter level here with value | 412 # Modify jitter level here with value |
376 api.execute_const_update_jitter( | 413 api.execute_const_update_jitter( |
377 FLAGS, conf, net, jitter_level, distribution=distribution | 414 FLAGS, conf, net, jitter_level, distribution=distribution) |
378 ) | |
379 | 415 |
380 output_folder = api.experiment_run(FLAGS, conf, net) | 416 output_folder = api.experiment_run(FLAGS, conf, net) |
381 | 417 |
382 print("**********************************************************") | 418 print("**********************************************************") |
383 print( | 419 print( |
384 "Experiments finished for: {0} jitter, and output at: {1}".format( | 420 "Experiments finished for: {0} jitter, and output at: {1}".format( |
385 jitter_level, output_folder | 421 jitter_level, output_folder)) |
386 ) | |
387 ) | |
388 print("**********************************************************") | 422 print("**********************************************************") |
389 | 423 |
390 # store intermediate results | 424 # store intermediate results |
391 result_for_jitter['result'] = get_yscb_data_from_folder( | 425 result_for_jitter['result'] = get_yscb_data_from_folder(output_folder) |
392 output_folder | |
393 ) | |
394 jitter_level_results.append(result_for_jitter) | 426 jitter_level_results.append(result_for_jitter) |
395 | 427 |
| 428 write_exp_config_to_exp_folder(unique_exp_folder, conf) |
396 write_results_dict_to_csv( | 429 write_results_dict_to_csv( |
397 results_dict=jitter_level_results, | 430 results_dict=jitter_level_results, |
398 location=unique_exp_folder, | 431 location=unique_exp_folder, |
399 filename='Varying_jitter_levels.csv' | 432 filename='Varying_jitter_levels.csv') |
400 ) | |
401 | 433 |
402 # All tests are finished at this point | 434 # All tests are finished at this point |
403 api.get_ycsb_plot_from_list( | 435 api.get_ycsb_plot_from_list( |
404 os.path.join(unique_exp_folder, 'Varying_jitter_levels.csv'), | 436 os.path.join(unique_exp_folder, 'Varying_jitter_levels.csv'), |
405 where_to_save=unique_exp_folder, | 437 where_to_save=unique_exp_folder, |
406 label="Varying jitter level effects" | 438 label="Varying jitter level effects") |
407 ) | |
408 | 439 |
409 | 440 |
410 def create_experiment_folders(unique_name=''): | 441 def create_experiment_folders(unique_name=''): |
411 create_folder( | 442 create_folder( |
412 os.path.join(conf["env"]["out_exp_dir"], 'exp_out'), | 443 os.path.join(conf["env"]["out_exp_dir"], 'exp_out'), |
413 remove_if_exists=False | 444 remove_if_exists=False) |
414 ) | |
415 # Create a unique folder for these runs, and save things there | 445 # Create a unique folder for these runs, and save things there |
416 if unique_name: | 446 if unique_name: |
417 unique_exp_folder_name = \ | 447 unique_exp_folder_name = \ |
418 'exp-{0}-{1}-results'.format(unique_name, int(time.time())) | 448 'exp-{0}-{1}-results'.format(unique_name, int(time.time())) |
419 else: | 449 else: |
420 unique_exp_folder_name = 'exp-{0}-results'.format(int(time.time())) | 450 unique_exp_folder_name = 'exp-{0}-results'.format(int(time.time())) |
421 | 451 |
422 create_folder_path = os.path.join( | 452 create_folder_path = os.path.join(conf["env"]["out_exp_dir"], 'exp_out', |
423 conf["env"]["out_exp_dir"], 'exp_out', unique_exp_folder_name | 453 unique_exp_folder_name) |
424 ) | |
425 create_folder(create_folder_path, remove_if_exists=False) | 454 create_folder(create_folder_path, remove_if_exists=False) |
426 return create_folder_path | 455 return create_folder_path |
427 | 456 |
428 | 457 |
429 def setup_testbed(FLAGS, conf, launch_system=False): | 458 def setup_testbed(FLAGS, conf, launch_system=False): |
430 """ | 459 """ |
431 Basic setting up of testbed, usually required for every experiment | 460 Basic setting up of testbed, usually required for every experiment |
432 :param FLAGS: | 461 :param FLAGS: |
433 :param conf: | 462 :param conf: |
434 :param launch_system: | 463 :param launch_system: |
(...skipping 10 matching lines...) Expand all Loading... |
445 | 474 |
446 # 3. LAUNCH SYSTEMS | 475 # 3. LAUNCH SYSTEMS |
447 if launch_system: | 476 if launch_system: |
448 api.experiment_launch_systems(FLAGS, conf, net) | 477 api.experiment_launch_systems(FLAGS, conf, net) |
449 | 478 |
450 return net | 479 return net |
451 | 480 |
452 | 481 |
453 if __name__ == '__main__': | 482 if __name__ == '__main__': |
454 parser = argparse.ArgumentParser( | 483 parser = argparse.ArgumentParser( |
455 "lxIII", add_help=False, | 484 "lxIII", |
456 parents=[get_mininet_flags(), jobgen.get_generators_argparser()], | 485 add_help=False, |
457 formatter_class=argparse.ArgumentDefaultsHelpFormatter | 486 parents=[get_mininet_flags(), |
458 ) | 487 jobgen.get_generators_argparser()], |
| 488 formatter_class=argparse.ArgumentDefaultsHelpFormatter) |
459 | 489 |
460 parser.add_argument( | 490 parser.add_argument( |
461 '---Launcher Flags---', | 491 '---Launcher Flags---', |
462 help='-----------------------------------------------------', | 492 help='-----------------------------------------------------', |
463 action='store_true') | 493 action='store_true') |
464 # parser.add_argument("--cfg", default="./experiments/sample/sample.json", | 494 # parser.add_argument("--cfg", default="./experiments/sample/sample.json", |
465 # help="A .json configuration file for the experiment") | 495 # help="A .json configuration file for the experiment") |
466 parser.add_argument( | 496 parser.add_argument( |
467 "--recreate_keyspace", action="store_true", | 497 "--recreate_keyspace", |
| 498 action="store_true", |
468 help="""YCSB key space will be created from scratch according to | 499 help="""YCSB key space will be created from scratch according to |
469 config. YCSB will be executed to populate the keyspace afterwards""") | 500 config. YCSB will be executed to populate the keyspace afterwards""") |
470 # Pass this option to repeat experiments with multiple configurations | 501 # Pass this option to repeat experiments with multiple configurations |
471 parser.add_argument( | 502 parser.add_argument( |
472 "--multiconf", action="store_true", | 503 "--multiconf", |
| 504 action="store_true", |
473 help="""Causes multiple experiments with different configurations""") | 505 help="""Causes multiple experiments with different configurations""") |
474 parser.add_argument( | 506 parser.add_argument( |
475 "--multiconf_propagation_delta", action="store_true", | 507 "--multiconf_propagation_delta", |
| 508 action="store_true", |
476 help='Causes multiple experiments with different delta configurations') | 509 help='Causes multiple experiments with different delta configurations') |
477 parser.add_argument( | 510 parser.add_argument( |
478 "--every_snitch", action="store_true", | 511 "--every_snitch", |
| 512 action="store_true", |
479 help='Causes multiple experiments with every snitch version') | 513 help='Causes multiple experiments with every snitch version') |
480 parser.add_argument( | 514 parser.add_argument( |
481 "--vary_threads", action="store_true", | 515 "--vary_threads", |
| 516 action="store_true", |
482 help="""Causes multiple experiments with different YCSB thread· | 517 help="""Causes multiple experiments with different YCSB thread· |
483 configurations""") | 518 configurations""") |
484 parser.add_argument( | 519 parser.add_argument( |
485 "--vary_latency", action="store_true", | 520 "--vary_latency", |
| 521 action="store_true", |
486 help="""Causes multiple experiments with different latency· | 522 help="""Causes multiple experiments with different latency· |
487 configurations""") | 523 configurations""") |
488 parser.add_argument( | 524 parser.add_argument( |
489 "--vary_jitter", action="store_true", | 525 "--vary_jitter", |
| 526 action="store_true", |
490 help="""Causes multiple experiments with different jitter· | 527 help="""Causes multiple experiments with different jitter· |
491 configurations""") | 528 configurations""") |
492 parser.add_argument( | 529 parser.add_argument( |
493 "--worst_case", action="store_true", | 530 "--worst_case", |
494 help='Simulate a worst case scenario with maximum latency and jitter' | 531 action="store_true", |
495 ) | 532 help='Simulate a worst case scenario with maximum latency and jitter') |
496 parser.add_argument( | 533 parser.add_argument( |
497 "--latency", type=int, default=0, | 534 "--latency", type=int, default=0, help='Latency value for worst_case') |
498 help='Latency value for worst_case' | |
499 ) | |
500 parser.add_argument( | 535 parser.add_argument( |
501 "--jitter", type=int, default = 0, | 536 "--jitter", type=int, default=0, help='Jitter value for worst_case') |
502 help='Jitter value for worst_case' | |
503 ) | |
504 parser.add_argument( | 537 parser.add_argument( |
505 "--distribution", default='normal', | 538 "--distribution", default='normal', help='Jitter distribution name') |
506 help='Jitter distribution name' | |
507 ) | |
508 parser.add_argument( | 539 parser.add_argument( |
509 "--setup_only", action="store_true", | 540 "--setup_only", |
| 541 action="store_true", |
510 help="""Does not runs experiment, but only sets up everything from· | 542 help="""Does not runs experiment, but only sets up everything from· |
511 scratch. Option is propagated by overwriting certain fields in the· | 543 scratch. Option is propagated by overwriting certain fields in the· |
512 config json.""") | 544 config json.""") |
513 parser.add_argument( | 545 parser.add_argument( |
514 "--workloads", nargs='*', default=[], | 546 "--workloads", |
| 547 nargs='*', |
| 548 default=[], |
515 help="List of workloads to execute after initial setup") | 549 help="List of workloads to execute after initial setup") |
516 parser.add_argument( | 550 parser.add_argument( |
517 "--repeat", type=int, default=0, | 551 "--repeat", |
| 552 type=int, |
| 553 default=0, |
518 help="Overwrites the number of times each experiment will be repeated") | 554 help="Overwrites the number of times each experiment will be repeated") |
519 parser.add_argument( | 555 parser.add_argument( |
520 "--test", action="store_true", | 556 "--test", |
| 557 action="store_true", |
521 help="Executes a single dynamic latency/jitter experiment with " | 558 help="Executes a single dynamic latency/jitter experiment with " |
522 "ping tests." | 559 "ping tests.") |
523 ) | |
524 parser.add_argument( | 560 parser.add_argument( |
525 "--vary_latency_score", action="store_true", | 561 "--vary_latency_plot_score", |
| 562 action="store_true", |
526 help="""Causes multiple experiments with different latency· | 563 help="""Causes multiple experiments with different latency· |
527 configurations and collect score data""") | 564 configurations and collect score data""") |
| 565 |
| 566 parser.add_argument( |
| 567 "--vary_latency_and_jitter_plot_score", |
| 568 action="store_true", |
| 569 help="""Causes multiple experiments with different jitter |
| 570 configurations and collect score data""") |
| 571 |
528 FLAGS = parser.parse_args() | 572 FLAGS = parser.parse_args() |
529 # Notify our chatbot about this operation | 573 # Notify our chatbot about this operation |
530 generate_slack_notifications(message="Test run started") | 574 generate_slack_notifications(message="Test run started") |
531 | 575 |
532 conf = json.load(FLAGS.cfg_json) | 576 conf = json.load(FLAGS.cfg_json) |
533 conf = adjust_by_flags(FLAGS, conf) | 577 conf = adjust_by_flags(FLAGS, conf) |
534 create_ping_plot_data_dirs(conf=conf) | 578 create_ping_plot_data_dirs(conf=conf) |
535 | 579 |
536 if FLAGS.multiconf: | 580 if FLAGS.multiconf: |
537 unique_exp_folder = create_experiment_folders() | 581 unique_exp_folder = create_experiment_folders() |
538 # This is now in a separate function for simpler reuse | 582 # This is now in a separate function for simpler reuse |
539 run_multiconf_experiments(FLAGS, conf, unique_exp_folder) | 583 run_multiconf_experiments(FLAGS, conf, unique_exp_folder) |
| 584 # Do initial setting up testbed here |
| 585 net = setup_testbed(FLAGS, conf, launch_system=True) |
| 586 # Load YCSB stuff to the keyspace |
| 587 api.experiment_setup_keyspace(FLAGS, conf, net=net) |
| 588 # Run experiments one after other |
| 589 print("#############################################################") |
| 590 print("Muliconf multi thread experiment started") |
| 591 run_multiconf_threads_and_plot( |
| 592 FLAGS, conf, net=net, unique_exp_folder=unique_exp_folder) |
| 593 print("Muliconf multi thread experiment finished") |
| 594 print("#############################################################") |
| 595 print("#############################################################") |
| 596 print("Muliconf multi sleep time experiment started") |
| 597 run_multiconf_sleep_time( |
| 598 FLAGS, conf, net=net, unique_exp_folder=unique_exp_folder) |
| 599 print("Muliconf multi sleep time experiment finished") |
| 600 print("#############################################################") |
| 601 print("#############################################################") |
| 602 print("Muliconf multi jitter experiment started") |
| 603 run_multiconf_jitter( |
| 604 FLAGS, conf, net=net, unique_exp_folder=unique_exp_folder) |
| 605 print("Muliconf multi jitter experiment finished") |
| 606 print("#############################################################") |
540 | 607 |
| 608 elif FLAGS.vary_latency_plot_score: |
| 609 if FLAGS.repeat > 0: |
| 610 conf["cassandra"]["exp"]["repeat"] = FLAGS.repeat |
| 611 |
| 612 unique_exp_folder = create_experiment_folders() |
| 613 |
| 614 # Do initial setting up testbed here |
| 615 net = setup_testbed(FLAGS, conf, launch_system=True) |
| 616 # Load YCSB stuff to the keyspace |
| 617 api.experiment_setup_keyspace(FLAGS, conf, net=net) |
| 618 |
| 619 print("#########################################################") |
| 620 print("Muliconf multi sleep time experiment started with score log") |
| 621 execute_ping_nodes_generate_output(conf=conf, net=net) |
| 622 run_multiconf_sleep_time( |
| 623 FLAGS, |
| 624 conf, |
| 625 net=net, |
| 626 unique_exp_folder=unique_exp_folder, |
| 627 use_jitter=False) |
| 628 print("extract data experiment starting .........") |
| 629 extract_data_from_log_cas( |
| 630 conf=conf, |
| 631 pattern='The new score of host', |
| 632 output_dir=unique_exp_folder) |
| 633 print( |
| 634 "score data with running multiconf_sleep have been sent to unique fo
lder" |
| 635 ) |
| 636 plot_score_data(conf, target_folder=unique_exp_folder) |
| 637 plot_host_to_host_latency(conf, save_dir=unique_exp_folder) |
| 638 copy_ping_result_files(conf, output_folder=unique_exp_folder) |
| 639 plot_both_score_and_latency(conf, target_folder=unique_exp_folder) |
| 640 print( |
| 641 "Muliconf sleep time and read data from log files experiment finishe
d" |
| 642 ) |
| 643 print("#############################################################") |
| 644 |
| 645 elif FLAGS.vary_latency_and_jitter_plot_score: |
| 646 if FLAGS.repeat > 0: |
| 647 conf["cassandra"]["exp"]["repeat"] = FLAGS.repeat |
| 648 |
| 649 unique_exp_folder = create_experiment_folders() |
| 650 # Do initial setting up testbed here |
| 651 net = setup_testbed(FLAGS, conf, launch_system=True) |
| 652 # Load YCSB stuff to the keyspace |
| 653 api.experiment_setup_keyspace(FLAGS, conf, net=net) |
| 654 execute_ping_nodes_generate_output(conf=conf, net=net) |
| 655 print("############################################################") |
| 656 print("Muliconf multi jitter level experiment started with score log") |
| 657 run_multiconf_sleep_time( |
| 658 FLAGS, |
| 659 conf, |
| 660 net=net, |
| 661 unique_exp_folder=unique_exp_folder, |
| 662 use_jitter=True) |
| 663 |
| 664 print("extract data experiment starting .........") |
| 665 extract_data_from_log_cas_jitter( |
| 666 conf=conf, |
| 667 pattern='The new score of host', |
| 668 output_dir=unique_exp_folder) |
| 669 print("data have been sent to exp_out") |
| 670 plot_score_data_jitter(conf, target_folder=unique_exp_folder) |
| 671 plot_host_to_host_jitter(conf, save_dir=unique_exp_folder) |
| 672 copy_ping_result_files(conf, output_folder=unique_exp_folder) |
| 673 plot_both_score_jitter(conf, target_folder=unique_exp_folder) |
| 674 print( |
| 675 "Muliconf sleep time and read data from log files experiment finishe
d" |
| 676 ) |
| 677 print("#############################################################") |
541 elif FLAGS.every_snitch: | 678 elif FLAGS.every_snitch: |
542 run_multiconf_experiments_with_every_snitch(FLAGS, conf) | 679 run_multiconf_experiments_with_every_snitch(FLAGS, conf) |
543 | |
544 elif FLAGS.setup_only: | 680 elif FLAGS.setup_only: |
545 # Setup only is not going to have Cassandra instances therefore we can | 681 # Setup only is not going to have Cassandra instances therefore we can |
546 # ignore notify_cassandra | 682 # ignore notify_cassandra |
547 conf['notify_cassandra'] = False | 683 conf['notify_cassandra'] = False |
548 net = setup_testbed(FLAGS, conf, launch_system=False) | 684 net = setup_testbed(FLAGS, conf, launch_system=False) |
549 elif FLAGS.test: # Ping tests has a dedicated flag | 685 elif FLAGS.test: # Ping tests has a dedicated flag |
550 if conf['notify_cassandra']: | 686 if conf['notify_cassandra']: |
551 raise Exception( | 687 raise Exception( |
552 "Error: notify_cassandra is set to true while there are no " | 688 "Error: notify_cassandra is set to true while there are no " |
553 "Cassandra instances" | 689 "Cassandra instances") |
554 ) | |
555 net = setup_testbed(FLAGS, conf, launch_system=False) | 690 net = setup_testbed(FLAGS, conf, launch_system=False) |
556 # start pinging and saving data here (so that we dont have to do it | 691 # start pinging and saving data here (so that we dont have to do it |
557 # again later) | 692 # again later) |
558 execute_ping_nodes_generate_output(conf=conf, net=net) | 693 execute_ping_nodes_generate_output(conf=conf, net=net) |
559 | 694 |
560 # Here we should execute further changes to testbed and plot | 695 # Here we should execute further changes to testbed and plot |
561 api.execute_update_latencies( | 696 api.execute_update_latencies( |
562 FLAGS, conf, net, frequency=10, round_repeat=False | 697 FLAGS, conf, net, frequency=10, round_repeat=False) |
563 ) | |
564 plot_ping_results( | 698 plot_ping_results( |
565 conf, | 699 conf, |
566 target_folder=os.path.join( | 700 target_folder=os.path.join(conf["env"]["out_exp_dir"], 'plot_data', |
567 conf["env"]["out_exp_dir"], 'plot_data', 'latency_data' | 701 'latency_data'), |
568 ), | 702 where_to_save=os.path.join(conf["env"]["out_exp_dir"], 'plot_data', |
569 where_to_save=os.path.join( | 703 'latency_data'), |
570 conf["env"]["out_exp_dir"], 'plot_data', 'latency_data' | 704 title='Round-Trip-Time vs Time at varying Latency') |
571 ), | |
572 title='Round-Trip-Time vs Time at varying Latency' | |
573 ) | |
574 plot_ping_results( | 705 plot_ping_results( |
575 conf, | 706 conf, |
576 target_folder=os.path.join( | 707 target_folder=os.path.join(conf["env"]["out_exp_dir"], 'plot_data', |
577 conf["env"]["out_exp_dir"], 'plot_data', 'jitter_data' | 708 'jitter_data'), |
578 ), | 709 where_to_save=os.path.join(conf["env"]["out_exp_dir"], 'plot_data', |
579 where_to_save=os.path.join( | 710 'score_data'), |
580 conf["env"]["out_exp_dir"], 'plot_data', 'score_data' | 711 title='Round-Trip-Time vs Time at varying Jitter') |
581 ), | 712 |
582 title='Round-Trip-Time vs Time at varying Jitter' | |
583 ) | |
584 elif FLAGS.worst_case: | 713 elif FLAGS.worst_case: |
585 # If this is made - make super bad latency and jitter configs | 714 # If this is made - make super bad latency and jitter configs |
586 net = setup_testbed(FLAGS, conf, launch_system=True) | 715 net = setup_testbed(FLAGS, conf, launch_system=True) |
587 api.experiment_setup_keyspace(FLAGS, conf, net=net) | 716 api.experiment_setup_keyspace(FLAGS, conf, net=net) |
588 print("#############################################################") | 717 print("#############################################################") |
589 print("Constant worst case test started") | 718 print("Constant worst case test started") |
590 # execute_ping_nodes_generate_output(conf=conf, net=net) | 719 # execute_ping_nodes_generate_output(conf=conf, net=net) |
591 run_constant_latency_and_jitter_exp( | 720 run_constant_latency_and_jitter_exp( |
592 FLAGS, conf, net=net, latency=FLAGS.latency, jitter=FLAGS.jitter, | 721 FLAGS, |
593 distribution=FLAGS.distribution | 722 conf, |
594 ) | 723 net=net, |
| 724 latency=FLAGS.latency, |
| 725 jitter=FLAGS.jitter, |
| 726 distribution=FLAGS.distribution) |
595 print("Constant worst case test finished") | 727 print("Constant worst case test finished") |
596 | 728 |
597 elif FLAGS.multiconf_propagation_delta: | 729 elif FLAGS.multiconf_propagation_delta: |
598 unique_exp_folder = create_experiment_folders() | 730 unique_exp_folder = create_experiment_folders() |
599 # If this is made - make super bad latency and jitter configs | 731 # If this is made - make super bad latency and jitter configs |
600 net = setup_testbed(FLAGS, conf, launch_system=True) | 732 net = setup_testbed(FLAGS, conf, launch_system=True) |
601 api.experiment_setup_keyspace(FLAGS, conf, net=net) | 733 api.experiment_setup_keyspace(FLAGS, conf, net=net) |
602 print("#############################################################") | 734 print("#############################################################") |
603 print("Multiple propogation delta test started") | 735 print("Multiple propogation delta test started") |
604 run_multiconf_propagation_delta_fs( | 736 run_multiconf_propagation_delta_fs( |
605 FLAGS, conf, net=net, jitter=FLAGS.jitter, latency=FLAGS.latency, | 737 FLAGS, |
| 738 conf, |
| 739 net=net, |
| 740 jitter=FLAGS.jitter, |
| 741 latency=FLAGS.latency, |
606 distribution=FLAGS.distribution, | 742 distribution=FLAGS.distribution, |
607 unique_exp_folder=unique_exp_folder | 743 unique_exp_folder=unique_exp_folder) |
608 ) | |
609 print('Multiple propogation delta test finished') | 744 print('Multiple propogation delta test finished') |
610 print("#############################################################") | 745 print("#############################################################") |
611 else: # If no flag has been provided, we give CLI back to the user | 746 else: # If no flag has been provided, we give CLI back to the user |
612 net = setup_testbed(FLAGS, conf, launch_system=True) | 747 net = setup_testbed(FLAGS, conf, launch_system=True) |
613 # Load YCSB stuff to the keyspace | 748 # Load YCSB stuff to the keyspace |
614 api.experiment_setup_keyspace(FLAGS, conf, net=net) | 749 api.experiment_setup_keyspace(FLAGS, conf, net=net) |
615 cli.run_cli(FLAGS, conf, net) | 750 cli.run_cli(FLAGS, conf, net) |
OLD | NEW |