@@ -120,6 +120,7 @@ def parse_common_params(
120120 resource_prefix : Optional [str ] = None ,
121121 initialize_deployment : bool = True ,
122122 ignore_cache : bool = False ,
123+ storage_configuration : Optional [str ] = None
123124):
124125
125126 global sebs_client , deployment_client
@@ -139,6 +140,10 @@ def parse_common_params(
139140 update_nested_dict (config_obj , ["experiments" , "update_code" ], update_code )
140141 update_nested_dict (config_obj , ["experiments" , "update_storage" ], update_storage )
141142
143+ if storage_configuration :
144+ cfg = json .load (open (storage_configuration , 'r' ))
145+ update_nested_dict (config_obj , ["deployment" , deployment , "storage" ], cfg )
146+
142147 if initialize_deployment :
143148 deployment_client = sebs_client .get_deployment (
144149 config_obj ["deployment" ], logging_filename = logging_filename
@@ -403,7 +408,7 @@ def local():
403408@click .argument ("benchmark-input-size" , type = click .Choice (["test" , "small" , "large" ]))
404409@click .argument ("output" , type = str )
405410@click .option ("--deployments" , default = 1 , type = int , help = "Number of deployed containers." )
406- @click .option ("--deployments " , default = 1 , type = int , help = "Number of deployed containers ." )
411+ @click .option ("--storage-configuration " , type = str , help = "JSON configuration of deployed storage ." )
407412@click .option ("--measure-interval" , type = int , default = - 1 ,
408413 help = "Interval duration between memory measurements in ms." )
409414@click .option (
@@ -412,14 +417,15 @@ def local():
412417 help = "Remove containers after stopping." ,
413418)
414419@simplified_common_params
415- def start (benchmark , benchmark_input_size , output , deployments , measure_interval ,
416- remove_containers , ** kwargs ):
420+ def start (benchmark , benchmark_input_size , output , deployments , storage_configuration ,
421+ measure_interval , remove_containers , ** kwargs ):
417422 """
418423 Start a given number of function instances and a storage instance.
419424 """
420425
421426 (config , output_dir , logging_filename , sebs_client , deployment_client ) = parse_common_params (
422- ignore_cache = True , update_code = False , update_storage = False , deployment = "local" , ** kwargs
427+ ignore_cache = True , update_code = False , update_storage = False ,
428+ deployment = "local" , storage_configuration = storage_configuration , ** kwargs
423429 )
424430 deployment_client = cast (sebs .local .Local , deployment_client )
425431 deployment_client .remove_containers = remove_containers
0 commit comments