Parse command line inputs. Some user inputs needs to be transformed from delimited strings to lists in order to be consumed by the performacne framework. Additionally, plugin_names are converted into objects, and need to be added to the config.
()
| 208 | |
| 209 | |
| 210 | def create_workload_config(): |
| 211 | """Parse command line inputs. |
| 212 | |
| 213 | Some user inputs needs to be transformed from delimited strings to lists in order to be |
| 214 | consumed by the performacne framework. Additionally, plugin_names are converted into |
| 215 | objects, and need to be added to the config. |
| 216 | """ |
| 217 | config = deepcopy(vars(options)) |
| 218 | # We don't need workloads and query_names in the config map as they're already specified |
| 219 | # in the workload object. |
| 220 | del config['workloads'] |
| 221 | del config['query_names'] |
| 222 | config['plugin_runner'] = plugin_runner |
| 223 | # transform a few options from strings to lists |
| 224 | config['table_formats'] = split_and_strip(config['table_formats']) |
| 225 | impalads = split_and_strip(config['impalads']) |
| 226 | # Randomize the order of impalads. |
| 227 | shuffle(impalads) |
| 228 | config['impalads'] = deque(impalads) |
| 229 | return WorkloadConfig(**config) |
| 230 | |
| 231 | |
| 232 | def _validate_options(): |
no test coverage detected