throw error if writers < 1

Signed-off-by: Мария Малыгина <m.malygina@yadro.com>
This commit is contained in:
Мария Малыгина 2023-07-18 12:32:57 +03:00
parent 9251007cae
commit 57f4a0010f
2 changed files with 9 additions and 9 deletions

View file

@ -180,9 +180,9 @@ Options:
* `S3_ENDPOINTS` - - endpoints of S3 gateways in format `host:port`. To specify multiple endpoints separate them by
comma.
* `WRITERS` - number of VUs performing upload payload operation
* `WRITERS_MULTIPART` - specifies the number of parts to upload in parallel
* `WRITE_OBJ_PART_SIZE` - specifies the buffer size, in bytes, of each part to upload. The minimum size per part is 5
* `WRITERS` - number of VUs performing write operations.
* `WRITERS_MULTIPART` - number of parts to upload in parallel.
* `WRITE_OBJ_PART_SIZE` - specifies the buffer size, in bytes, of each part to upload. The minimum size per part is 5MB
MiB.
## S3 Local

View file

@ -36,18 +36,18 @@ const generator = datagen.generator(1024 * parseInt(__ENV.WRITE_OBJ_SIZE), __ENV
const scenarios = {};
const write_vu_count = parseInt(__ENV.WRITERS || '0');
// write parts in parallel
const write_multipart_vu_count = parseInt(__ENV.WRITERS_MULTIPART || '0');
if (write_vu_count < 1) {
throw 'number of VUs performing upload payload operation should be greater than 0';
if (WRITERS < 1) {
throw 'number of VUs performing write operations should be greater than 0';
}
if (WRITERS_MULTIPART < 1) {
throw 'number of parts to upload in parallel should be greater than 0';
}
const write_vu_count = parseInt(__ENV.WRITERS || '0');
// write parts in parallel
const write_multipart_vu_count = parseInt(__ENV.WRITERS_MULTIPART || '0');
if (write_vu_count > 0) {
scenarios.write = {
executor: 'constant-vus',