|
24 | 24 |
|
25 | 25 |
|
26 | 26 | def _get_params() -> Dict[str, List[ReadParameters]]: |
27 | | - """ |
28 | | - Docstring for _get_params |
29 | | - 1. this function output a list of readParameters. |
30 | | - 2. to populate the values of readparameters, use default values from config.yaml |
31 | | - 3. generate all possible params , ie |
32 | | - no. of params should be equal to bucket_type*file_size_mib, chunk_size * process * coros |
33 | | - you may use itertools.product |
| 27 | + """Generates a dictionary of benchmark parameters for read operations. |
| 28 | +
|
| 29 | + This function reads configuration from a `config.yaml` file, which defines |
| 30 | + common parameters (like bucket types, file sizes) and different workloads. |
| 31 | + It then generates all possible combinations of these parameters for each |
| 32 | + workload using `itertools.product`. |
| 33 | +
|
| 34 | + The resulting parameter sets are encapsulated in `ReadParameters` objects |
| 35 | + and organized by workload name in the returned dictionary. |
| 36 | +
|
| 37 | + Bucket names can be overridden by setting the `DEFAULT_RAPID_ZONAL_BUCKET` |
| 38 | + and `DEFAULT_STANDARD_BUCKET` environment variables. |
| 39 | +
|
| 40 | + Returns: |
| 41 | + Dict[str, List[ReadParameters]]: A dictionary where keys are workload |
| 42 | + names (e.g., 'read_seq', 'read_rand_multi_coros') and values are lists |
| 43 | + of `ReadParameters` objects, each representing a unique benchmark scenario. |
34 | 44 | """ |
35 | 45 | params: Dict[str, List[ReadParameters]] = {} |
36 | 46 | config_path = os.path.join(os.path.dirname(__file__), "config.yaml") |
@@ -75,10 +85,7 @@ def _get_params() -> Dict[str, List[ReadParameters]]: |
75 | 85 | chunk_size_bytes = chunk_size_mib * 1024 * 1024 |
76 | 86 | bucket_name = bucket_map[bucket_type] |
77 | 87 |
|
78 | | - if "single_file" in workload_name: |
79 | | - num_files = 1 |
80 | | - else: |
81 | | - num_files = num_processes * num_coros |
| 88 | + num_files = num_processes * num_coros |
82 | 89 |
|
83 | 90 | # Create a descriptive name for the parameter set |
84 | 91 | name = f"{pattern}_{bucket_type}_{num_processes}p_{num_coros}c" |
|
0 commit comments