From 3af4dfd977cb60744060a51c184b3b48400965ea Mon Sep 17 00:00:00 2001 From: "m.malygina" Date: Fri, 27 Oct 2023 10:56:27 +0300 Subject: [PATCH] multipart scenario Signed-off-by: m.malygina --- src/frostfs_testlib/load/load_config.py | 16 +++++++++++++--- src/frostfs_testlib/load/load_metrics.py | 1 + src/frostfs_testlib/load/load_report.py | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/frostfs_testlib/load/load_config.py b/src/frostfs_testlib/load/load_config.py index 678fc38..a5d8535 100644 --- a/src/frostfs_testlib/load/load_config.py +++ b/src/frostfs_testlib/load/load_config.py @@ -19,6 +19,7 @@ class LoadScenario(Enum): gRPC_CAR = "grpc_car" S3 = "s3" S3_CAR = "s3_car" + S3_MULTIPART = "s3_multipart" HTTP = "http" VERIFY = "verify" LOCAL = "local" @@ -37,10 +38,11 @@ all_load_scenarios = [ LoadScenario.S3_CAR, LoadScenario.gRPC_CAR, LoadScenario.LOCAL, + LoadScenario.S3_MULTIPART ] all_scenarios = all_load_scenarios.copy() + [LoadScenario.VERIFY] -constant_vus_scenarios = [LoadScenario.gRPC, LoadScenario.S3, LoadScenario.HTTP, LoadScenario.LOCAL] +constant_vus_scenarios = [LoadScenario.gRPC, LoadScenario.S3, LoadScenario.HTTP, LoadScenario.LOCAL, LoadScenario.S3_MULTIPART] constant_arrival_rate_scenarios = [LoadScenario.gRPC_CAR, LoadScenario.S3_CAR] grpc_preset_scenarios = [ @@ -49,7 +51,7 @@ grpc_preset_scenarios = [ LoadScenario.gRPC_CAR, LoadScenario.LOCAL, ] -s3_preset_scenarios = [LoadScenario.S3, LoadScenario.S3_CAR] +s3_preset_scenarios = [LoadScenario.S3, LoadScenario.S3_CAR, LoadScenario.S3_MULTIPART] @dataclass @@ -172,7 +174,7 @@ class LoadParams: k6_url: Optional[str] = None # No ssl verification flag no_verify_ssl: Optional[bool] = metadata_field( - [LoadScenario.S3, LoadScenario.S3_CAR, LoadScenario.VERIFY, LoadScenario.HTTP], + [LoadScenario.S3, LoadScenario.S3_CAR, LoadScenario.S3_MULTIPART, LoadScenario.VERIFY, LoadScenario.HTTP], "no-verify-ssl", "NO_VERIFY_SSL", False, @@ -258,6 +260,14 @@ class LoadParams: constant_arrival_rate_scenarios, None, "MAX_DELETERS", False, True ) + # Multipart + # Number of parts to upload in parallel + writers_multipart: Optional[int] = metadata_field( + [LoadScenario.S3_MULTIPART], None, "WRITERS_MULTIPART", False, True + ) + # part size must be greater than (5 MB) + write_object_part_size: Optional[int] = metadata_field([LoadScenario.S3_MULTIPART], None, "WRITE_OBJ_PART_SIZE", False) + # Period of time to apply the rate value. time_unit: Optional[str] = metadata_field( constant_arrival_rate_scenarios, None, "TIME_UNIT", False diff --git a/src/frostfs_testlib/load/load_metrics.py b/src/frostfs_testlib/load/load_metrics.py index 6c201ec..474a96b 100644 --- a/src/frostfs_testlib/load/load_metrics.py +++ b/src/frostfs_testlib/load/load_metrics.py @@ -196,6 +196,7 @@ def get_metrics_object(load_type: LoadScenario, summary: dict[str, Any]) -> Metr LoadScenario.HTTP: GrpcMetrics, LoadScenario.S3: S3Metrics, LoadScenario.S3_CAR: S3Metrics, + LoadScenario.S3_MULTIPART: S3Metrics, LoadScenario.VERIFY: VerifyMetrics, LoadScenario.LOCAL: LocalMetrics, } diff --git a/src/frostfs_testlib/load/load_report.py b/src/frostfs_testlib/load/load_report.py index ec6d539..b648bc2 100644 --- a/src/frostfs_testlib/load/load_report.py +++ b/src/frostfs_testlib/load/load_report.py @@ -92,6 +92,7 @@ class LoadReport: model_map = { LoadScenario.gRPC: "closed model", LoadScenario.S3: "closed model", + LoadScenario.S3_MULTIPART: "closed model", LoadScenario.HTTP: "closed model", LoadScenario.gRPC_CAR: "open model", LoadScenario.S3_CAR: "open model",