[TrueCloudLab/xk6-frostfs#125] Add acl option
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
parent
2255ee465f
commit
5c0d20c345
|
@ -147,6 +147,8 @@ class Preset:
|
|||
pregen_json: Optional[str] = metadata_field(all_load_scenarios, "out", "PREGEN_JSON", False)
|
||||
# Workers count for preset
|
||||
workers: Optional[int] = metadata_field(all_load_scenarios, "workers", None, False)
|
||||
# Acl for container/buckets
|
||||
acl: Optional[str] = metadata_field(all_load_scenarios, "acl", None, False)
|
||||
|
||||
# ------ GRPC ------
|
||||
# Amount of containers which should be created
|
||||
|
|
|
@ -107,66 +107,66 @@ class DeleteOperationMetric(OperationMetric):
|
|||
|
||||
|
||||
class GrpcWriteOperationMetric(WriteOperationMetric):
|
||||
_SUCCESS = "frostfs_obj_put_total"
|
||||
_SUCCESS = "frostfs_obj_put_success"
|
||||
_ERRORS = "frostfs_obj_put_fails"
|
||||
_LATENCY = "frostfs_obj_put_duration"
|
||||
|
||||
|
||||
class GrpcReadOperationMetric(ReadOperationMetric):
|
||||
_SUCCESS = "frostfs_obj_get_total"
|
||||
_SUCCESS = "frostfs_obj_get_success"
|
||||
_ERRORS = "frostfs_obj_get_fails"
|
||||
_LATENCY = "frostfs_obj_get_duration"
|
||||
|
||||
|
||||
class GrpcDeleteOperationMetric(DeleteOperationMetric):
|
||||
_SUCCESS = "frostfs_obj_delete_total"
|
||||
_SUCCESS = "frostfs_obj_delete_success"
|
||||
_ERRORS = "frostfs_obj_delete_fails"
|
||||
_LATENCY = "frostfs_obj_delete_duration"
|
||||
|
||||
|
||||
class S3WriteOperationMetric(WriteOperationMetric):
|
||||
_SUCCESS = "aws_obj_put_total"
|
||||
_SUCCESS = "aws_obj_put_success"
|
||||
_ERRORS = "aws_obj_put_fails"
|
||||
_LATENCY = "aws_obj_put_duration"
|
||||
|
||||
|
||||
class S3ReadOperationMetric(ReadOperationMetric):
|
||||
_SUCCESS = "aws_obj_get_total"
|
||||
_SUCCESS = "aws_obj_get_success"
|
||||
_ERRORS = "aws_obj_get_fails"
|
||||
_LATENCY = "aws_obj_get_duration"
|
||||
|
||||
|
||||
class S3DeleteOperationMetric(DeleteOperationMetric):
|
||||
_SUCCESS = "aws_obj_delete_total"
|
||||
_SUCCESS = "aws_obj_delete_success"
|
||||
_ERRORS = "aws_obj_delete_fails"
|
||||
_LATENCY = "aws_obj_delete_duration"
|
||||
|
||||
|
||||
class S3LocalWriteOperationMetric(WriteOperationMetric):
|
||||
_SUCCESS = "s3local_obj_put_total"
|
||||
_SUCCESS = "s3local_obj_put_success"
|
||||
_ERRORS = "s3local_obj_put_fails"
|
||||
_LATENCY = "s3local_obj_put_duration"
|
||||
|
||||
|
||||
class S3LocalReadOperationMetric(ReadOperationMetric):
|
||||
_SUCCESS = "s3local_obj_get_total"
|
||||
_SUCCESS = "s3local_obj_get_success"
|
||||
_ERRORS = "s3local_obj_get_fails"
|
||||
_LATENCY = "s3local_obj_get_duration"
|
||||
|
||||
|
||||
class LocalWriteOperationMetric(WriteOperationMetric):
|
||||
_SUCCESS = "local_obj_put_total"
|
||||
_SUCCESS = "local_obj_put_success"
|
||||
_ERRORS = "local_obj_put_fails"
|
||||
_LATENCY = "local_obj_put_duration"
|
||||
|
||||
|
||||
class LocalReadOperationMetric(ReadOperationMetric):
|
||||
_SUCCESS = "local_obj_get_total"
|
||||
_SUCCESS = "local_obj_get_success"
|
||||
_ERRORS = "local_obj_get_fails"
|
||||
|
||||
|
||||
class LocalDeleteOperationMetric(DeleteOperationMetric):
|
||||
_SUCCESS = "local_obj_delete_total"
|
||||
_SUCCESS = "local_obj_delete_success"
|
||||
_ERRORS = "local_obj_delete_fails"
|
||||
|
||||
|
||||
|
|
|
@ -136,6 +136,7 @@ class TestLoadConfig:
|
|||
def test_argument_parsing_for_grpc_scenario(self, load_params: LoadParams):
|
||||
expected_preset_args = [
|
||||
"--size '11'",
|
||||
"--acl 'acl'",
|
||||
"--preload_obj '13'",
|
||||
"--out 'pregen_json'",
|
||||
"--workers '7'",
|
||||
|
@ -174,6 +175,7 @@ class TestLoadConfig:
|
|||
"--ignore-errors",
|
||||
"--sleep '19'",
|
||||
"--local",
|
||||
"--acl 'acl'",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 9,
|
||||
|
@ -211,6 +213,7 @@ class TestLoadConfig:
|
|||
"--location 's3_location'",
|
||||
"--ignore-errors",
|
||||
"--sleep '19'",
|
||||
"--acl 'acl'",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 9,
|
||||
|
@ -242,6 +245,7 @@ class TestLoadConfig:
|
|||
"--location 's3_location'",
|
||||
"--ignore-errors",
|
||||
"--sleep '19'",
|
||||
"--acl 'acl'",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 183900,
|
||||
|
@ -279,6 +283,7 @@ class TestLoadConfig:
|
|||
"--location 's3_location'",
|
||||
"--ignore-errors",
|
||||
"--sleep '19'",
|
||||
"--acl 'acl'",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 9,
|
||||
|
@ -317,6 +322,7 @@ class TestLoadConfig:
|
|||
"--policy 'container_placement_policy'",
|
||||
"--ignore-errors",
|
||||
"--sleep '19'",
|
||||
"--acl 'acl'",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 9,
|
||||
|
@ -347,6 +353,7 @@ class TestLoadConfig:
|
|||
"--policy 'container_placement_policy'",
|
||||
"--ignore-errors",
|
||||
"--sleep '19'",
|
||||
"--acl 'acl'",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"CONFIG_FILE": "config_file",
|
||||
|
@ -399,6 +406,7 @@ class TestLoadConfig:
|
|||
"--containers '0'",
|
||||
"--policy ''",
|
||||
"--sleep '0'",
|
||||
"--acl ''",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 0,
|
||||
|
@ -427,6 +435,7 @@ class TestLoadConfig:
|
|||
"--containers '0'",
|
||||
"--policy ''",
|
||||
"--sleep '0'",
|
||||
"--acl ''",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 0,
|
||||
|
@ -462,6 +471,7 @@ class TestLoadConfig:
|
|||
"--buckets '0'",
|
||||
"--location ''",
|
||||
"--sleep '0'",
|
||||
"--acl ''",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 0,
|
||||
|
@ -490,6 +500,7 @@ class TestLoadConfig:
|
|||
"--buckets '0'",
|
||||
"--location ''",
|
||||
"--sleep '0'",
|
||||
"--acl ''",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 0,
|
||||
|
@ -525,6 +536,7 @@ class TestLoadConfig:
|
|||
"--containers '0'",
|
||||
"--policy ''",
|
||||
"--sleep '0'",
|
||||
"--acl ''",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"DURATION": 0,
|
||||
|
@ -553,6 +565,7 @@ class TestLoadConfig:
|
|||
"--containers '0'",
|
||||
"--policy ''",
|
||||
"--sleep '0'",
|
||||
"--acl ''",
|
||||
]
|
||||
expected_env_vars = {
|
||||
"CONFIG_FILE": "",
|
||||
|
|
Loading…
Reference in New Issue