multipart scenario

Signed-off-by: m.malygina <m.malygina@yadro.com>
This commit is contained in:
m.malygina 2023-10-27 10:56:27 +03:00
parent 8a360683ae
commit 3af4dfd977
3 changed files with 15 additions and 3 deletions

View file

@ -19,6 +19,7 @@ class LoadScenario(Enum):
gRPC_CAR = "grpc_car" gRPC_CAR = "grpc_car"
S3 = "s3" S3 = "s3"
S3_CAR = "s3_car" S3_CAR = "s3_car"
S3_MULTIPART = "s3_multipart"
HTTP = "http" HTTP = "http"
VERIFY = "verify" VERIFY = "verify"
LOCAL = "local" LOCAL = "local"
@ -37,10 +38,11 @@ all_load_scenarios = [
LoadScenario.S3_CAR, LoadScenario.S3_CAR,
LoadScenario.gRPC_CAR, LoadScenario.gRPC_CAR,
LoadScenario.LOCAL, LoadScenario.LOCAL,
LoadScenario.S3_MULTIPART
] ]
all_scenarios = all_load_scenarios.copy() + [LoadScenario.VERIFY] 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] constant_arrival_rate_scenarios = [LoadScenario.gRPC_CAR, LoadScenario.S3_CAR]
grpc_preset_scenarios = [ grpc_preset_scenarios = [
@ -49,7 +51,7 @@ grpc_preset_scenarios = [
LoadScenario.gRPC_CAR, LoadScenario.gRPC_CAR,
LoadScenario.LOCAL, LoadScenario.LOCAL,
] ]
s3_preset_scenarios = [LoadScenario.S3, LoadScenario.S3_CAR] s3_preset_scenarios = [LoadScenario.S3, LoadScenario.S3_CAR, LoadScenario.S3_MULTIPART]
@dataclass @dataclass
@ -172,7 +174,7 @@ class LoadParams:
k6_url: Optional[str] = None k6_url: Optional[str] = None
# No ssl verification flag # No ssl verification flag
no_verify_ssl: Optional[bool] = metadata_field( 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",
"NO_VERIFY_SSL", "NO_VERIFY_SSL",
False, False,
@ -258,6 +260,14 @@ class LoadParams:
constant_arrival_rate_scenarios, None, "MAX_DELETERS", False, True 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. # Period of time to apply the rate value.
time_unit: Optional[str] = metadata_field( time_unit: Optional[str] = metadata_field(
constant_arrival_rate_scenarios, None, "TIME_UNIT", False constant_arrival_rate_scenarios, None, "TIME_UNIT", False

View file

@ -196,6 +196,7 @@ def get_metrics_object(load_type: LoadScenario, summary: dict[str, Any]) -> Metr
LoadScenario.HTTP: GrpcMetrics, LoadScenario.HTTP: GrpcMetrics,
LoadScenario.S3: S3Metrics, LoadScenario.S3: S3Metrics,
LoadScenario.S3_CAR: S3Metrics, LoadScenario.S3_CAR: S3Metrics,
LoadScenario.S3_MULTIPART: S3Metrics,
LoadScenario.VERIFY: VerifyMetrics, LoadScenario.VERIFY: VerifyMetrics,
LoadScenario.LOCAL: LocalMetrics, LoadScenario.LOCAL: LocalMetrics,
} }

View file

@ -92,6 +92,7 @@ class LoadReport:
model_map = { model_map = {
LoadScenario.gRPC: "closed model", LoadScenario.gRPC: "closed model",
LoadScenario.S3: "closed model", LoadScenario.S3: "closed model",
LoadScenario.S3_MULTIPART: "closed model",
LoadScenario.HTTP: "closed model", LoadScenario.HTTP: "closed model",
LoadScenario.gRPC_CAR: "open model", LoadScenario.gRPC_CAR: "open model",
LoadScenario.S3_CAR: "open model", LoadScenario.S3_CAR: "open model",