@@ -26,7 +26,22 @@ def prepare_ycsb_benchmark_command(
2626 workload = None
2727 threads = None
2828 override_workload_properties = []
29- for k in benchmark_config ["parameters" ]:
29+ if type (benchmark_config ["parameters" ]) == list :
30+ for k in benchmark_config ["parameters" ]:
31+ if "database" in k :
32+ database = k ["database" ]
33+ if "step" in k :
34+ step = k ["step" ]
35+ if "workload" in k :
36+ workload = k ["workload" ]
37+ if current_workdir is not None and workload .startswith ("./" ):
38+ workload = "{}{}" .format (current_workdir , workload [1 :])
39+ if "threads" in k :
40+ threads = k ["threads" ]
41+ if "override_workload_properties" in k :
42+ override_workload_properties = k ["override_workload_properties" ]
43+ if type (benchmark_config ["parameters" ]) == dict :
44+ k = benchmark_config ["parameters" ]
3045 if "database" in k :
3146 database = k ["database" ]
3247 if "step" in k :
@@ -47,9 +62,10 @@ def prepare_ycsb_benchmark_command(
4762 if threads :
4863 command_arr .extend (["-p" , '"threadcount={}"' .format (threads )])
4964
50- command_arr .extend (["-p" , '"redis.host={}"' .format (server_private_ip )])
51-
52- command_arr .extend (["-p" , '"redis.port={}"' .format (server_plaintext_port )])
65+ if server_private_ip is not None :
66+ command_arr .extend (["-p" , '"redis.host={}"' .format (server_private_ip )])
67+ if server_plaintext_port is not None :
68+ command_arr .extend (["-p" , '"redis.port={}"' .format (server_plaintext_port )])
5369
5470 for prop in override_workload_properties :
5571 for k , v in prop .items ():
0 commit comments