From 3d63772f4a9dd0aec84220f77336da6157fc1666 Mon Sep 17 00:00:00 2001 From: Andrey Berezin Date: Wed, 13 Dec 2023 18:50:06 +0300 Subject: [PATCH] [#148] Add support for custom registry during read operations Signed-off-by: Andrey Berezin --- src/frostfs_testlib/load/load_config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/frostfs_testlib/load/load_config.py b/src/frostfs_testlib/load/load_config.py index df46521..3ea66b8 100644 --- a/src/frostfs_testlib/load/load_config.py +++ b/src/frostfs_testlib/load/load_config.py @@ -205,8 +205,12 @@ class LoadParams: object_size: Optional[int] = metadata_field(all_load_scenarios, "size", "WRITE_OBJ_SIZE", False) # For read operations, controls from which set get objects to read read_from: Optional[ReadFrom] = None + # For read operations done from REGISTRY, controls delay which object should live before it will be used for read operation + read_age: Optional[int] = metadata_field(all_load_scenarios, None, "READ_AGE", False) # Output registry K6 file. Filled automatically. registry_file: Optional[str] = metadata_field(all_scenarios, None, "REGISTRY_FILE", False) + # In case if we want to use custom registry file left from another load run + custom_registry: Optional[str] = None # Specifies the minimum duration of every single execution (i.e. iteration). # Any iterations that are shorter than this value will cause that VU to # sleep for the remainder of the time until the specified minimum duration is reached. @@ -294,6 +298,11 @@ class LoadParams: if self.read_from == ReadFrom.REGISTRY: self.registry_file = os.path.join(self.working_dir, f"{load_id}_registry.bolt") + + # For now it's okay to have it this way + if self.custom_registry is not None: + self.registry_file = self.custom_registry + if self.read_from == ReadFrom.PRESET: self.registry_file = None