[#148] Add support for custom registry during read operations
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
02f3ef6b40
commit
3d63772f4a
1 changed files with 9 additions and 0 deletions
|
@ -205,8 +205,12 @@ class LoadParams:
|
||||||
object_size: Optional[int] = metadata_field(all_load_scenarios, "size", "WRITE_OBJ_SIZE", False)
|
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
|
# For read operations, controls from which set get objects to read
|
||||||
read_from: Optional[ReadFrom] = None
|
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.
|
# Output registry K6 file. Filled automatically.
|
||||||
registry_file: Optional[str] = metadata_field(all_scenarios, None, "REGISTRY_FILE", False)
|
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).
|
# Specifies the minimum duration of every single execution (i.e. iteration).
|
||||||
# Any iterations that are shorter than this value will cause that VU to
|
# 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.
|
# 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:
|
if self.read_from == ReadFrom.REGISTRY:
|
||||||
self.registry_file = os.path.join(self.working_dir, f"{load_id}_registry.bolt")
|
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:
|
if self.read_from == ReadFrom.PRESET:
|
||||||
self.registry_file = None
|
self.registry_file = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue